Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container") + var ErrEmptyChainID = errors.New("empty chain ID") + var ErrEmptyExportFolderPath = errors.New("empty export folder path") + var ErrEmptyVersionString = errors.New("empty version string") + var ErrExpectedOneStartOfEpochMetaBlock = errors.New("expected one start of epoch metaBlock") + var ErrImportingData = errors.New("error importing data") + var ErrIncorrectHardforkMessage = errors.New("incorrect hardfork message") + var ErrInvalidContainerKey = errors.New("element does not exist in container") + var ErrInvalidEpoch = errors.New("invalid epoch") + var ErrInvalidFolderName = errors.New("invalid folder name") + var ErrInvalidMaxHardCapForMissingNodes = errors.New("invalid max hardcap for missing nodes") + var ErrInvalidMiniBlockType = errors.New("invalid miniBlock type") + var ErrInvalidNumConcurrentTrieSyncers = errors.New("invalid num concurrent trie syncers") + var ErrInvalidTimeToWaitAfterHardfork = errors.New("invalid time to wait after hard fork") + var ErrInvalidValue = errors.New("invalid value") + var ErrKeyTypeMismatch = errors.New("key type mismatch while importing") + var ErrLenMismatch = errors.New("lengths mismatch") + var ErrMiniBlockNotFoundInImportedMap = errors.New("miniBlock was not found in imported map") + var ErrNilAccounts = errors.New("nil accounts") + var ErrNilAccountsDBSyncContainer = errors.New("nil accounts db sync container") + var ErrNilAddressConverter = errors.New("nil address converter") + var ErrNilAntiFloodHandler = errors.New("nil anti flood handler") + var ErrNilAppStatusHandler = errors.New("nil app status handler") + var ErrNilArgumentParser = errors.New("nil argument parser") + var ErrNilBlockBody = errors.New("nil block body") + var ErrNilBlockKeyGen = errors.New("nil block key gen") + var ErrNilBlockSigner = errors.New("nil block signer") + var ErrNilCacher = errors.New("nil cacher") + var ErrNilChanStopNodeProcess = errors.New("nil channel to stop node") + var ErrNilCloser = errors.New("nil closer instance") + var ErrNilContainerElement = errors.New("element cannot be nil") + var ErrNilCoreComponents = errors.New("nil core components") + var ErrNilCryptoComponents = errors.New("nil crypto components") + var ErrNilDataPoolHolder = errors.New("nil data pool holder") + var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler") + var ErrNilEpochConfirmedNotifier = errors.New("nil epoch confirmed notifier") + var ErrNilEpochHandler = errors.New("nil epoch handler") + var ErrNilEpochStartMetaBlock = errors.New("nil epoch start metaBlock was provided") + var ErrNilExportFactoryHandler = errors.New("nil export factory handler") + var ErrNilGenesisNodesSetupHandler = errors.New("nil genesis nodes setup handler") + var ErrNilHardForkBlockProcessor = errors.New("nil hard fork block processor") + var ErrNilHardforkStorer = errors.New("nil hardfork storer") + var ErrNilHasher = errors.New("nil Hasher") + var ErrNilHeaderHandler = errors.New("nil header handler") + var ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier") + var ErrNilHeaderSigVerifier = errors.New("nil header sig verifier") + var ErrNilHeaderSyncHandler = errors.New("nil header sync handler") + var ErrNilHeaderValidator = errors.New("nil header validator") + var ErrNilImportHandler = errors.New("nil import handler") + var ErrNilImportStartHandler = errors.New("nil import start handler") + var ErrNilInterceptorsContainer = errors.New("nil interceptors container") + var ErrNilKeyGenerator = errors.New("nil key generator") + var ErrNilMarshalizer = errors.New("nil Marshalizer") + var ErrNilMessenger = errors.New("nil Messenger") + var ErrNilMiniBlocksSyncHandler = errors.New("nil miniblocks sync handler") + var ErrNilMultiSigner = errors.New("nil multi signer") + var ErrNilNetworkComponents = errors.New("nil network components") + var ErrNilNodesCoordinator = errors.New("nil nodes coordinator") + var ErrNilPeersRatingHandler = errors.New("nil peers rating handler") + var ErrNilPendingTxProcessor = errors.New("nil pending tx processor") + var ErrNilPubKeyConverter = errors.New("nil public key converter") + var ErrNilReceiptsRepository = errors.New("nil receipts repository") + var ErrNilRequestHandler = errors.New("nil request handler") + var ErrNilRequestersContainer = errors.New("nil requesters container") + var ErrNilResolverContainer = errors.New("nil resolver container") + var ErrNilRoundHandler = errors.New("nil round handler") + var ErrNilRwdTxProcessor = errors.New("nil reward transaction processor") + var ErrNilSCRProcessor = errors.New("nil smart contract result processor") + var ErrNilShardCoordinator = errors.New("nil shard coordinator") + var ErrNilSingleSigner = errors.New("nil single signer") + var ErrNilStateSyncer = errors.New("nil state syncer") + var ErrNilStatusCoreComponentsHolder = errors.New("nil status core components holder") + var ErrNilStorage = errors.New("nil storage") + var ErrNilStorageManager = errors.New("nil trie storage manager") + var ErrNilTimeCache = errors.New("nil time cache") + var ErrNilTransactionsSyncHandler = errors.New("nil transaction sync handler") + var ErrNilTrieDataGetter = errors.New("nil trie data getter provided") + var ErrNilTrieStorageManagers = errors.New("nil trie storage managers") + var ErrNilTrieSyncers = errors.New("nil trie syncers") + var ErrNilTxCoordinator = errors.New("nil tx coordinator") + var ErrNilTxProcessor = errors.New("nil transaction processor") + var ErrNilUint64Converter = errors.New("uint64converter is nil") + var ErrNilUnFinishedMetaBlocksMap = errors.New("nil unFinished metaBlocks map was provided") + var ErrNilValidityAttester = errors.New("nil validity attester") + var ErrNilWhiteListHandler = errors.New("nil white list handler") + var ErrNotEpochStartBlock = errors.New("not epoch start block") + var ErrNotSynced = errors.New("not synced") + var ErrPostProcessTransactionNotFound = errors.New("transaction was not found in post process map") + var ErrTimeIsOut = errors.New("time is out") + var ErrTransactionNotFoundInImportedMap = errors.New("transaction was not found in imported map") + var ErrTriggerAlreadyInAction = errors.New("trigger already in action") + var ErrTriggerNotEnabled = errors.New("trigger is not enabled") + var ErrTriggerPubKeyMismatch = errors.New("trigger public key mismatch") + var ErrUnknownType = errors.New("unknown type") + var ErrWrongImportedMiniBlocksMap = errors.New("wrong imported miniBlocks map was provided") + var ErrWrongImportedTransactionsMap = errors.New("wrong imported transactions map was provided") + var ErrWrongTypeAssertion = errors.New("wrong type assertion") + var ErrWrongTypeInContainer = errors.New("wrong type of object inside container") + var ErrWrongUnFinishedMetaHdrsMap = errors.New("wrong unFinished meta headers map") + func CreatePostMiniBlocks(args ArgsHardForkProcessor) error + func GetPendingMiniBlocks(epochStartMetaBlock data.MetaHeaderHandler, ...) ([]data.MiniBlockHeaderHandler, error) + type AccountsDBSyncContainer interface + Add func(key string, val AccountsDBSyncer) error + AddMultiple func(keys []string, values []AccountsDBSyncer) error + Get func(key string) (AccountsDBSyncer, error) + IsInterfaceNil func() bool + Len func() int + Remove func(key string) + Replace func(key string, val AccountsDBSyncer) error + type AccountsDBSyncer interface + GetSyncedTries func() map[string]common.Trie + IsInterfaceNil func() bool + SyncAccounts func(rootHash []byte, storageMarker common.StorageMarker) error + type ArgsHardForkProcessor struct + Hasher hashing.Hasher + MapBodies map[uint32]*block.Body + MapHardForkBlockProcessor map[uint32]HardForkBlockProcessor + Marshalizer marshal.Marshalizer + PostMbs []*MbInfo + ShardIDs []uint32 + type Closer interface + Close func() error + IsInterfaceNil func() bool + type DataWriter interface + Flush func() error + WriteString func(s string) (int, error) + type EpochChangeConfirmedNotifier interface + IsInterfaceNil func() bool + RegisterForEpochChangeConfirmed func(handler func(epoch uint32)) + type EpochHandler interface + ForceEpochStart func(round uint64) + IsInterfaceNil func() bool + MetaEpoch func() uint32 + type EpochStartPendingMiniBlocksSyncHandler interface + GetMiniBlocks func() (map[string]*block.MiniBlock, error) + IsInterfaceNil func() bool + SyncPendingMiniBlocksFromMeta func(epochStart data.MetaHeaderHandler, ...) error + type EpochStartTriesSyncHandler interface + GetTries func() (map[string]common.Trie, error) + IsInterfaceNil func() bool + SyncTriesFrom func(meta data.MetaHeaderHandler) error + type EpochStartVerifier interface + Epoch func() uint32 + EpochStartMetaHdrHash func() []byte + IsEpochStart func() bool + IsInterfaceNil func() bool + type ExportFactoryHandler interface + Create func() (ExportHandler, error) + IsInterfaceNil func() bool + type ExportHandler interface + ExportAll func(epoch uint32) error + IsInterfaceNil func() bool + type GenesisNodesSetupHandler interface + GetAdaptivity func() bool + GetHysteresis func() float32 + GetMetaConsensusGroupSize func() uint32 + GetRoundDuration func() uint64 + GetShardConsensusGroupSize func() uint32 + GetStartTime func() int64 + InitialNodesInfo func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, ...) + InitialNodesInfoForShard func(shardId uint32) ([]nodesCoordinator.GenesisNodeInfoHandler, ...) + IsInterfaceNil func() bool + MinNumberOfMetaNodes func() uint32 + MinNumberOfNodes func() uint32 + MinNumberOfShardNodes func() uint32 + NumberOfShards func() uint32 + type HardForkBlockProcessor interface + CreateBlock func(body *block.Body, chainID string, round uint64, nonce uint64, epoch uint32) (data.HeaderHandler, error) + CreateBody func() (*block.Body, []*MbInfo, error) + CreatePostMiniBlocks func(mbsInfo []*MbInfo) (*block.Body, []*MbInfo, error) + IsInterfaceNil func() bool + type HardforkStorer interface + Close func() error + FinishedIdentifier func(identifier string) error + Get func(identifier string, key []byte) ([]byte, error) + IsInterfaceNil func() bool + RangeKeys func(handler func(identifier string, keys [][]byte) bool) + Write func(identifier string, key []byte, value []byte) error + type HeaderSyncHandler interface + GetEpochStartMetaBlock func() (data.MetaHeaderHandler, error) + GetUnFinishedMetaBlocks func() (map[string]data.MetaHeaderHandler, error) + IsInterfaceNil func() bool + SyncUnFinishedMetaHeaders func(epoch uint32) error + type HistoryStorer interface + ClearCache func() + DestroyUnit func() error + Get func(key []byte) ([]byte, error) + GetFromEpoch func(key []byte, epoch uint32) ([]byte, error) + Has func(key []byte) error + IsInterfaceNil func() bool + Put func(key, data []byte) error + Remove func(key []byte) error + type ImportHandler interface + Close func() error + GetAccountsDBForShard func(shardID uint32) state.AccountsAdapter + GetHardForkMetaBlock func() data.MetaHeaderHandler + GetMiniBlocks func() map[string]*block.MiniBlock + GetTransactions func() map[string]data.TransactionHandler + GetUnFinishedMetaBlocks func() map[string]data.MetaHeaderHandler + GetValidatorAccountsDB func() state.AccountsAdapter + ImportAll func() error + IsInterfaceNil func() bool + type ImportStartHandler interface + IsAfterExportBeforeImport func() bool + IsInterfaceNil func() bool + ResetStartImport func() error + SetStartImport func() error + ShouldStartImport func() bool + type MbInfo struct + MbHash []byte + ReceiverShardID uint32 + SenderShardID uint32 + TxsInfo []*TxInfo + Type block.Type + func CleanDuplicates(args ArgsHardForkProcessor) ([]*MbInfo, error) + func CreateBody(args ArgsHardForkProcessor) ([]*MbInfo, error) + type MissingHeadersByHashSyncer interface + ClearFields func() + GetHeaders func() (map[string]data.HeaderHandler, error) + IsInterfaceNil func() bool + SyncMissingHeadersByHash func(shardIDs []uint32, headersHashes [][]byte, ctx context.Context) error + type PendingTransactionProcessor interface + Commit func() ([]byte, error) + IsInterfaceNil func() bool + ProcessTransactionsDstMe func(mbInfo *MbInfo) (*block.MiniBlock, error) + RootHash func() ([]byte, error) + type PreferredPeersHolderHandler interface + Clear func() + Contains func(peerID core.PeerID) bool + Get func() map[uint32][]core.PeerID + IsInterfaceNil func() bool + PutConnectionAddress func(peerID core.PeerID, address string) + PutShardID func(peerID core.PeerID, shardID uint32) + Remove func(peerID core.PeerID) + type RequestHandler interface + GetNumPeersToQuery func(key string) (int, int, error) + IsInterfaceNil func() bool + RequestInterval func() time.Duration + RequestMetaHeader func(hash []byte) + RequestMetaHeaderByNonce func(nonce uint64) + RequestMiniBlock func(shardId uint32, miniblockHash []byte) + RequestRewardTransactions func(destShardID uint32, txHashes [][]byte) + RequestShardHeader func(shardId uint32, hash []byte) + RequestShardHeaderByNonce func(shardId uint32, nonce uint64) + RequestStartOfEpochMetaBlock func(epoch uint32) + RequestTransaction func(shardId uint32, txHashes [][]byte) + RequestTrieNodes func(destShardID uint32, hashes [][]byte, topic string) + RequestUnsignedTransactions func(destShardID uint32, scrHashes [][]byte) + SetNumPeersToQuery func(key string, intra int, cross int) error + type RoundHandler interface + Index func() int64 + IsInterfaceNil func() bool + TimeStamp func() time.Time + type SigVerifier interface + IsInterfaceNil func() bool + Verify func(message []byte, sig []byte, pk []byte) error + type StateSyncer interface + GetAllMiniBlocks func() (map[string]*block.MiniBlock, error) + GetAllTransactions func() (map[string]data.TransactionHandler, error) + GetAllTries func() (map[string]common.Trie, error) + GetAllValidatorsInfo func() (map[string]*state.ShardValidatorInfo, error) + GetEpochStartMetaBlock func() (data.MetaHeaderHandler, error) + GetUnFinishedMetaBlocks func() (map[string]data.MetaHeaderHandler, error) + IsInterfaceNil func() bool + SyncAllState func(epoch uint32) error + type TransactionsSyncHandler interface + ClearFields func() + GetTransactions func() (map[string]data.TransactionHandler, error) + GetValidatorsInfo func() (map[string]*state.ShardValidatorInfo, error) + IsInterfaceNil func() bool + SyncTransactionsFor func(miniBlocks map[string]*block.MiniBlock, epoch uint32, ctx context.Context) error + type TrieSyncContainer interface + Add func(key string, val TrieSyncer) error + AddMultiple func(keys []string, interceptors []TrieSyncer) error + Get func(key string) (TrieSyncer, error) + IsInterfaceNil func() bool + Len func() int + Remove func(key string) + Replace func(key string, val TrieSyncer) error + type TrieSyncer interface + IsInterfaceNil func() bool + StartSyncing func(rootHash []byte, ctx context.Context) error + Trie func() common.Trie + type TxInfo struct + Tx data.TransactionHandler + TxHash []byte + type WhiteListHandler interface + Add func(keys [][]byte) + IsInterfaceNil func() bool + IsWhiteListed func(interceptedData process.InterceptedData) bool + IsWhiteListedAtLeastOne func(identifiers [][]byte) bool + Remove func(keys [][]byte)