Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 Changes in this version + const SoftRestartMessage + var ErrCannotCastAccountHandlerToUserAccountHandler = errors.New("cannot cast account handler to user account handler") + var ErrCannotCastUserAccountHandlerToVmCommonUserAccountHandler = errors.New("cannot cast user account handler to vm common user account handler") + var ErrDataFieldTooBig = errors.New("data field is too big") + var ErrDifferentSenderShardId = errors.New(...) + var ErrEmptyQueryHandlerName = errors.New("empty query handler name") + var ErrInvalidAddressLength = errors.New("invalid address length") + var ErrInvalidChainIDInTransaction = errors.New("invalid chain ID") + var ErrInvalidESDTRole = errors.New("invalid ESDT role") + var ErrInvalidReceiverUsernameLength = errors.New("invalid receiver username length") + var ErrInvalidSenderUsernameLength = errors.New("invalid sender username length") + var ErrInvalidSignatureLength = errors.New("invalid signature length") + var ErrInvalidTransactionVersion = errors.New("invalid transaction version") + var ErrInvalidValue = errors.New("invalid value") + var ErrMetachainOnlyEndpoint = errors.New("the endpoint is only available on metachain nodes") + var ErrNegativeOrZeroConsensusGroupSize = errors.New("group size should be a strict positive number") + var ErrNilAccountsAdapter = errors.New("trying to set nil accounts adapter") + var ErrNilBootstrapComponents = errors.New("nil bootstrap componennts") + var ErrNilCoreComponents = errors.New("nil core components") + var ErrNilCryptoComponents = errors.New("nil crypto components") + var ErrNilDataComponents = errors.New("nil data components") + var ErrNilDataPool = errors.New("trying to set nil data pool") + var ErrNilESDTNFTStorageHandler = errors.New("nil esdt and nft storage handler") + var ErrNilMarshalizer = errors.New("trying to set nil marshalizer") + var ErrNilNetworkComponents = errors.New("nil network components") + var ErrNilNodeStopChannel = errors.New("nil node stop channel") + var ErrNilPeerDenialEvaluator = errors.New("nil peer denial evaluator") + var ErrNilPrivateKey = errors.New("trying to set nil private key") + var ErrNilProcessComponents = errors.New("nil process components") + var ErrNilPubkeyConverter = errors.New("trying to use a nil pubkey converter") + var ErrNilQueryHandler = errors.New("nil query handler") + var ErrNilRequestedItemsHandler = errors.New("nil requested items handler") + var ErrNilShardCoordinator = errors.New("trying to set nil shard coordinator") + var ErrNilSingleSig = errors.New("trying to set nil singlesig") + var ErrNilStateComponents = errors.New("nil state components") + var ErrNilStatusComponents = errors.New("nil status components") + var ErrNilStorer = errors.New("nil storer") + var ErrNodeCloseFailed = errors.New("node closing failed ") + var ErrQueryHandlerAlreadyExists = errors.New("query handler already exists") + var ErrSystemBusyGeneratingTransactions = errors.New("system busy while generating bulk transactions") + var ErrTransactionValueLengthTooBig = errors.New("value length is too big") + var ErrTrieOperationsTimeout = errors.New("trie operations timeout") + var ErrUnknownPeerID = errors.New("unknown peer ID") + var ErrZeroRoundDurationNotSupported = errors.New("0 round duration time is not supported") + func NewNodeRunner(cfgs *config.Configs) (*nodeRunner, error) + type HardforkTrigger interface + AddCloser func(closer update.Closer) error + CreateData func() []byte + IsInterfaceNil func() bool + IsSelfTrigger func() bool + NotifyTriggerReceived func() <-chan struct{} + NotifyTriggerReceivedV2 func() <-chan struct{} + RecordedTriggerMessage func() ([]byte, bool) + SetExportFactoryHandler func(exportFactoryHandler update.ExportFactoryHandler) error + Trigger func(epoch uint32, withEarlyEndOfEpoch bool) error + TriggerReceived func(payload []byte, data []byte, pkBytes []byte) (bool, error) + type HealthService interface + RegisterComponent func(component interface{}) + type HeartbeatHandler interface + IsInterfaceNil func() bool + Monitor func() *process.Monitor + Sender func() *process.Sender + type NetworkShardingCollector interface + GetPeerInfo func(pid core.PeerID) core.P2PPeerInfo + IsInterfaceNil func() bool + PutPeerIdSubType func(pid core.PeerID, peerSubType core.P2PPeerSubType) + UpdatePeerIDInfo func(pid core.PeerID, pk []byte, shardID uint32) + type Node struct + func CreateNode(config *config.Config, bootstrapComponents factory.BootstrapComponentsHandler, ...) (*Node, error) + func NewNode(opts ...Option) (*Node, error) + func (n *Node) AddQueryHandler(name string, handler debug.QueryHandler) error + func (n *Node) ApplyOptions(opts ...Option) error + func (n *Node) Close() error + func (n *Node) CreateShardedStores() error + func (n *Node) CreateTransaction(nonce uint64, value string, receiver string, receiverUsername []byte, ...) (*transaction.Transaction, []byte, error) + func (n *Node) DecodeAddressPubkey(pk string) ([]byte, error) + func (n *Node) DirectTrigger(epoch uint32, withEarlyEndOfEpoch bool) error + func (n *Node) EncodeAddressPubkey(pk []byte) (string, error) + func (n *Node) GenerateAndSendBulkTransactions(receiverHex string, value *big.Int, numOfTxs uint64, sk crypto.PrivateKey, ...) error + func (n *Node) GenerateTransaction(senderHex string, receiverHex string, value *big.Int, transactionData string, ...) (*transaction.Transaction, error) + func (n *Node) GetAccount(address string, options api.AccountQueryOptions) (api.AccountResponse, api.BlockInfo, error) + func (n *Node) GetAllESDTTokens(address string, options api.AccountQueryOptions, ctx context.Context) (map[string]*esdt.ESDigitalToken, api.BlockInfo, error) + func (n *Node) GetAllIssuedESDTs(tokenType string, ctx context.Context) ([]string, error) + func (n *Node) GetAppStatusHandler() core.AppStatusHandler + func (n *Node) GetBalance(address string, options api.AccountQueryOptions) (*big.Int, api.BlockInfo, error) + func (n *Node) GetBootstrapComponents() mainFactory.BootstrapComponentsHolder + func (n *Node) GetCode(codeHash []byte, options api.AccountQueryOptions) ([]byte, api.BlockInfo) + func (n *Node) GetConsensusComponents() mainFactory.ConsensusComponentsHolder + func (n *Node) GetConsensusGroupSize() int + func (n *Node) GetCoreComponents() mainFactory.CoreComponentsHolder + func (n *Node) GetCryptoComponents() mainFactory.CryptoComponentsHolder + func (n *Node) GetDataComponents() mainFactory.DataComponentsHolder + func (n *Node) GetESDTData(address, tokenID string, nonce uint64, options api.AccountQueryOptions) (*esdt.ESDigitalToken, api.BlockInfo, error) + func (n *Node) GetESDTsRoles(address string, options api.AccountQueryOptions, ctx context.Context) (map[string][]string, api.BlockInfo, error) + func (n *Node) GetESDTsWithRole(address string, role string, options api.AccountQueryOptions, ...) ([]string, api.BlockInfo, error) + func (n *Node) GetEpochStartDataAPI(epoch uint32) (*common.EpochStartDataAPI, error) + func (n *Node) GetHeartbeatComponents() mainFactory.HeartbeatComponentsHolder + func (n *Node) GetHeartbeatV2Components() mainFactory.HeartbeatV2ComponentsHolder + func (n *Node) GetHeartbeats() []heartbeatData.PubKeyHeartbeat + func (n *Node) GetKeyValuePairs(address string, options api.AccountQueryOptions, ctx context.Context) (map[string]string, api.BlockInfo, error) + func (n *Node) GetNFTTokenIDsRegisteredByAddress(address string, options api.AccountQueryOptions, ctx context.Context) ([]string, api.BlockInfo, error) + func (n *Node) GetNetworkComponents() mainFactory.NetworkComponentsHolder + func (n *Node) GetPeerInfo(pid string) ([]core.QueryP2PPeerInfo, error) + func (n *Node) GetProcessComponents() mainFactory.ProcessComponentsHolder + func (n *Node) GetProof(rootHash string, key string) (*common.GetProofResponse, error) + func (n *Node) GetProofDataTrie(rootHash string, address string, key string) (*common.GetProofResponse, *common.GetProofResponse, error) + func (n *Node) GetQueryHandler(name string) (debug.QueryHandler, error) + func (n *Node) GetStateComponents() mainFactory.StateComponentsHolder + func (n *Node) GetStatusComponents() mainFactory.StatusComponentsHolder + func (n *Node) GetTokenSupply(token string) (*api.ESDTSupply, error) + func (n *Node) GetUsername(address string, options api.AccountQueryOptions) (string, api.BlockInfo, error) + func (n *Node) GetValueForKey(address string, key string, options api.AccountQueryOptions) (string, api.BlockInfo, error) + func (n *Node) IsInImportMode() bool + func (n *Node) IsInterfaceNil() bool + func (n *Node) IsSelfTrigger() bool + func (n *Node) SendBulkTransactions(txs []*transaction.Transaction) (uint64, error) + func (n *Node) ValidateTransaction(tx *transaction.Transaction) error + func (n *Node) ValidateTransactionForSimulation(tx *transaction.Transaction, checkSignature bool) error + func (n *Node) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse, error) + func (n *Node) VerifyProof(rootHash string, address string, proof [][]byte) (bool, error) + type Option func(*Node) error + func WithAddressSignatureSize(signatureSize int) Option + func WithBootstrapComponents(bootstrapComponents factory.BootstrapComponentsHandler) Option + func WithBootstrapRoundIndex(bootstrapRoundIndex uint64) Option + func WithConsensusComponents(consensusComponents factory.ConsensusComponentsHandler) Option + func WithConsensusGroupSize(consensusGroupSize int) Option + func WithConsensusType(consensusType string) Option + func WithCoreComponents(coreComponents factory.CoreComponentsHandler) Option + func WithCryptoComponents(cryptoComponents factory.CryptoComponentsHandler) Option + func WithDataComponents(dataComponents factory.DataComponentsHandler) Option + func WithESDTNFTStorageHandler(storageHandler vmcommon.ESDTNFTStorageHandler) Option + func WithEnableSignTxWithHashEpoch(enableSignTxWithHashEpoch uint32) Option + func WithGenesisTime(genesisTime time.Time) Option + func WithHeartbeatComponents(heartbeatComponents factory.HeartbeatComponentsHandler) Option + func WithHeartbeatV2Components(heartbeatV2Components factory.HeartbeatV2ComponentsHandler) Option + func WithImportMode(importMode bool) Option + func WithInitialNodesPubKeys(pubKeys map[uint32][]string) Option + func WithNetworkComponents(networkComponents factory.NetworkComponentsHandler) Option + func WithNodeStopChannel(channel chan endProcess.ArgEndProcess) Option + func WithPeerDenialEvaluator(handler p2p.PeerDenialEvaluator) Option + func WithProcessComponents(processComponents factory.ProcessComponentsHandler) Option + func WithPublicKeySize(publicKeySize int) Option + func WithRequestedItemsHandler(requestedItemsHandler dataRetriever.RequestedItemsHandler) Option + func WithRoundDuration(roundDuration uint64) Option + func WithStateComponents(stateComponents factory.StateComponentsHandler) Option + func WithStatusComponents(statusComponents factory.StatusComponentsHandler) Option + func WithValidatorSignatureSize(signatureSize int) Option + type P2PAntifloodHandler interface + ApplyConsensusSize func(size int) + BlacklistPeer func(peer core.PeerID, reason string, duration time.Duration) + CanProcessMessage func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error + CanProcessMessagesOnTopic func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error + IsInterfaceNil func() bool + ResetForTopic func(topic string) + SetMaxMessagesForTopic func(topic string, maxNum uint32) + type P2PMessenger interface + Bootstrap func() error + Broadcast func(topic string, buff []byte) + BroadcastOnChannel func(channel string, topic string, buff []byte) + BroadcastOnChannelBlocking func(channel string, topic string, buff []byte) error + CreateTopic func(name string, createChannelForTopic bool) error + HasTopic func(name string) bool + ID func() core.PeerID + IsConnectedToTheNetwork func() bool + IsInterfaceNil func() bool + PeerAddresses func(pid core.PeerID) []string + Peers func() []core.PeerID + RegisterMessageProcessor func(topic string, identifier string, handler p2p.MessageProcessor) error + type Throttler interface + CanProcess func() bool + EndProcessing func() + IsInterfaceNil func() bool + StartProcessing func()