Versions in this module Expand all Collapse all v0 v0.0.2 Oct 31, 2023 Changes in this version + const MaxWaitingTimeToReceiveRequestedItem + const NodesSetupJsonFileName + var ErrNilSignalChan = errors.New("nil signal channel") + var ErrNilStore = errors.New("nil data storage service") + func DoesFileExist(path string) bool type KeyValueHolder + Key func() []byte + Value func() []byte v0.0.1 Oct 30, 2023 Changes in this version + const AllShardId + const BaseOperationCost + const BuiltInCost + const BuiltInFunctionChangeOwnerAddress + const BuiltInFunctionClaimDeveloperRewards + const BuiltInFunctionDCTTransfer + const BuiltInFunctionSaveKeyValue + const BuiltInFunctionSetUserName + const CombinedPeerType + const CommitMaxTime + const ConsensusOrder + const ConsensusTopic + const DefaultUnstakedEpoch + const DharitriProtectedKeyPrefix + const DisabledShardIDAsObserver + const ExtraDelayBetweenBroadcastMbsAndTxs + const ExtraDelayForBroadcastBlockInfo + const ExtraDelayForRequestBlockInfo + const FileModeUserReadWrite + const HeartbeatTopic + const HighestRoundFromBootStorage + const IndexerOrder + const InvalidMessageBlacklistDuration + const LastNonceKeyMetricsStorage + const MaxBulkTransactionSize + const MaxNumShards + const MaxRetriesToCreateDB + const MaxSoftwareVersionLengthInBytes + const MaxTxNonceDeltaAllowed + const MeasurementsLoggerFormat + const MegabyteSize + const MetaChainSystemSCsCost + const MetachainShardId + const MetricAppVersion + const MetricAverageBlockTxCount + const MetricChainId + const MetricConnectedNodes + const MetricConsensusGroupSize + const MetricConsensusRoundState + const MetricConsensusState + const MetricCountAcceptedBlocks + const MetricCountConsensus + const MetricCountConsensusAcceptedBlocks + const MetricCountLeader + const MetricCpuLoadPercent + const MetricCreatedProposedBlock + const MetricCrossCheckBlockHeight + const MetricCurrentBlockHash + const MetricCurrentRound + const MetricCurrentRoundTimestamp + const MetricDenomination + const MetricEpochNumber + const MetricGasPerDataByte + const MetricHeaderSize + const MetricHighestFinalBlockInShard + const MetricIsSyncing + const MetricLastBlockTxCount + const MetricLatestTagSoftwareVersion + const MetricLeaderPercentage + const MetricLiveValidatorNodes + const MetricMemHeapInUse + const MetricMemLoadPercent + const MetricMemStackInUse + const MetricMemTotal + const MetricMemUsedGolang + const MetricMemUsedSystem + const MetricMetaConsensusGroupSize + const MetricMinGasLimit + const MetricMinGasPrice + const MetricMinTransactionVersion + const MetricMiniBlocksSize + const MetricNetworkRecvBps + const MetricNetworkRecvBpsPeak + const MetricNetworkRecvPercent + const MetricNetworkSentBps + const MetricNetworkSentBpsPeak + const MetricNetworkSentPercent + const MetricNodeDisplayName + const MetricNodeType + const MetricNonce + const MetricNonceAtEpochStart + const MetricNonceForTPS + const MetricNoncesPassedInCurrentEpoch + const MetricNumConnectedPeers + const MetricNumConnectedPeersClassification + const MetricNumMetachainNodes + const MetricNumMiniBlocks + const MetricNumNodesPerShard + const MetricNumProcessedTxs + const MetricNumShardHeadersFromPool + const MetricNumShardHeadersProcessed + const MetricNumShardsWithoutMetacahin + const MetricNumTimesInForkChoice + const MetricNumTxInBlock + const MetricNumValidators + const MetricP2PCrossShardObservers + const MetricP2PCrossShardValidators + const MetricP2PIntraShardObservers + const MetricP2PIntraShardValidators + const MetricP2PNumConnectedPeersClassification + const MetricP2PNumReceiverPeers + const MetricP2PPeakNumReceiverPeers + const MetricP2PPeakPeerNumProcessedMessages + const MetricP2PPeakPeerNumReceivedMessages + const MetricP2PPeakPeerSizeProcessedMessages + const MetricP2PPeakPeerSizeReceivedMessages + const MetricP2PPeerInfo + const MetricP2PPeerNumProcessedMessages + const MetricP2PPeerNumReceivedMessages + const MetricP2PPeerSizeProcessedMessages + const MetricP2PPeerSizeReceivedMessages + const MetricP2PUnknownPeers + const MetricPeakTPS + const MetricPeerType + const MetricProbableHighestNonce + const MetricProcessedProposedBlock + const MetricPublicKeyBlockSign + const MetricReceivedProposedBlock + const MetricRewardsValue + const MetricRoundAtEpochStart + const MetricRoundDuration + const MetricRoundTime + const MetricRoundsPassedInCurrentEpoch + const MetricRoundsPerEpoch + const MetricShardConsensusGroupSize + const MetricShardId + const MetricStartTime + const MetricSynchronizedRound + const MetricTxPoolLoad + const NetworkShardingOrder + const NodesCoordinatorOrder + const NodesCoordinatorRegistryKeyPrefix + const NumInitCharactersForScAddress + const PathEpochPlaceholder + const PathIdentifierPlaceholder + const PathShardPlaceholder + const PublicKeyBlacklistDuration + const PutInStorerMaxTime + const RelayedTransaction + const SCDeployInitFunctionName + const ShardIdentiferLen + const ShuffledOut + const SleepTimeBetweenCreateDBRetries + const StorerOrder + const TriggerRegistryInitialKeyPrefix + const TriggerRegistryKeyPrefix + const UnVersionedAppString + const VMTypeLen + const WrongP2PMessageBlacklistDuration + var ErrEmptyFile = errors.New("empty file provided") + var ErrInvalidIdentifierForEpochStartBlockRequest = errors.New("invalid identifier for epoch start block request") + var ErrInvalidIndex = errors.New("invalid private key index") + var ErrInvalidPollingInterval = errors.New("invalid polling interval ") + var ErrInvalidValue = errors.New("invalid value provided") + var ErrMajorVersionMismatch = errors.New("major version mismatch") + var ErrMinorVersionMismatch = errors.New("minor version mismatch") + var ErrNilAppStatusHandler = errors.New("appStatusHandler is nil") + var ErrNilEpochStartNotifier = errors.New("nil epoch start notifier") + var ErrNilFile = errors.New("nil file provided") + var ErrNilHasher = errors.New("nil hasher provided") + var ErrNilInputData = errors.New("nil input data") + var ErrNilMarshalizer = errors.New("nil marshalizer provided") + var ErrNilNodesCoordinator = errors.New("nil nodes coordinator") + var ErrNilPemBLock = errors.New("nil pem block") + var ErrNilStatusTagProvider = errors.New("nil status tag provider") + var ErrNilUrl = errors.New("url is empty") + var ErrNotPositiveValue = errors.New("the provided value is not positive") + var ErrPemFileIsInvalid = errors.New("pem file is invalid") + var ErrReleaseVersionMismatch = errors.New("release version mismatch") + var ErrVersionNumComponents = errors.New("invalid version while checking number of components") + func CalculateHash(marshalizer marshal.Marshalizer, hasher hashing.Hasher, object interface{}) ([]byte, error) + func CommunicationIdentifierBetweenShards(shardId1 uint32, shardId2 uint32) string + func ConvertBytes(bytes uint64) string + func ConvertToEvenHex(value int) string + func ConvertToEvenHexBigInt(value *big.Int) string + func CreateFile(prefix string, subfolder string, fileExtension string) (*os.File, error) + func EmptyChannel(ch chan bool) int + func EpochStartIdentifier(epoch uint32) string + func GetPercentageOfValue(value *big.Int, percentage float64) *big.Int + func GetShardIDString(shardID uint32) string + func GetTrimmedPk(pk string) string + func IsEmptyAddress(address []byte) bool + func IsMetachainIdentifier(identifier []byte) bool + func IsSmartContractAddress(rcvAddress []byte) bool + func IsSmartContractOnMetachain(identifier []byte, rcvAddress []byte) bool + func IsUnknownEpochIdentifier(identifier []byte) (bool, error) + func LoadGasScheduleConfig(filepath string) (map[string]map[string]uint64, error) + func LoadJsonFile(dest interface{}, relativePath string) error + func LoadP2PConfig(filepath string) (*config.P2PConfig, error) + func LoadSkPkFromPemFile(relativePath string, skIndex int) ([]byte, string, error) + func LoadTomlFile(dest interface{}, relativePath string) error + func LoadTomlFileToMap(relativePath string) (map[string]interface{}, error) + func MaxInt(a int, b int) int + func MaxInt32(a int32, b int32) int32 + func MaxInt64(a int64, b int64) int64 + func MaxUint32(a uint32, b uint32) uint32 + func MaxUint64(a uint64, b uint64) uint64 + func MinInt(a int, b int) int + func MinInt32(a int32, b int32) int32 + func MinInt64(a int64, b int64) int64 + func MinUint32(a uint32, b uint32) uint32 + func MinUint64(a uint64, b uint64) uint64 + func OpenFile(relativePath string) (*os.File, error) + func SaveSkToPemFile(file *os.File, identifier string, skBytes []byte) error + func SecondsToHourMinSec(input int) string + func ShardIdToString(shardId uint32) string + func TrimSoftwareVersion(version string) string + func UniqueIdentifier() string + type AppStatusHandler interface + AddUint64 func(key string, val uint64) + Close func() + Decrement func(key string) + Increment func(key string) + IsInterfaceNil func() bool + SetInt64Value func(key string, value int64) + SetStringValue func(key string, value string) + SetUInt64Value func(key string, value uint64) + type ConnectedAddressesHandler interface + ConnectedAddresses func() []string + type KeyValueHolder interface + GetKey func() []byte + GetValue func() []byte + type NodeState int + const NsNotCalculated + const NsNotSynchronized + const NsSynchronized + type NodeType string + const NodeTypeObserver + const NodeTypeValidator + type P2PPeerInfo struct + PeerType P2PPeerType + PkBytes []byte + ShardID uint32 + type P2PPeerType int + const ObserverPeer + const UnknownPeer + const ValidatorPeer + func (pt P2PPeerType) String() string + type PeerID string + func (pid PeerID) Bytes() []byte + func (pid PeerID) Pretty() string + type PeerType string + const EligibleList + const InactiveList + const JailedList + const LeavingList + const NewList + const ObserverList + const WaitingList + type PubkeyConverter interface + Decode func(humanReadable string) ([]byte, error) + Encode func(pkBytes []byte) string + IsInterfaceNil func() bool + Len func() int + type QueryP2PPeerInfo struct + Addresses []string + IsBlacklisted bool + PeerType string + Pid string + Pk string + type StopWatch struct + func NewStopWatch() *StopWatch + func (sw *StopWatch) Add(src *StopWatch) + func (sw *StopWatch) GetMeasurement(identifier string) time.Duration + func (sw *StopWatch) GetMeasurements() []interface{} + func (sw *StopWatch) GetMeasurementsMap() map[string]float64 + func (sw *StopWatch) Start(identifier string) + func (sw *StopWatch) Stop(identifier string) + type Throttler interface + CanProcess func() bool + EndProcessing func() + IsInterfaceNil func() bool + StartProcessing func() + type TimersScheduler interface + Add func(callback func(alarmID string), duration time.Duration, alarmID string) + Cancel func(alarmID string) + Close func() + IsInterfaceNil func() bool + Reset func(alarmID string) + type TransactionStatus string + const TxStatusExecuted + const TxStatusPartiallyExecuted + const TxStatusReceived + type WatchdogTimer interface + IsInterfaceNil func() bool + Reset func(alarmID string) + Set func(callback func(alarmID string), duration time.Duration, alarmID string) + SetDefault func(duration time.Duration, alarmID string) + Stop func(alarmID string)