package
1.8.2
Repository: https://github.com/multiversx/mx-chain-go.git
Documentation: pkg.go.dev

# Functions

NewHashValidatorsShuffler creates a validator shuffler that uses a hash between validator key and a given random number to do the shuffling.
NewIndexHashedNodesCoordinator creates a new index hashed group selector.
NewIndexHashedNodesCoordinatorWithRater creates a new index hashed group selector.
NewNodesCoordinatorRegistryFactory creates a nodes coordinator registry factory which will create a NodesCoordinatorRegistryHandler from a buffer depending on the epoch.
NewSelectionBasedProvider will return a new instance of SelectionBasedProvider.
NewSelectorExpandedList creates a new selector initializing selection set to the given lists of validators and expanding it according to each validator weight.
NewSelectorWRS creates a new selector initializing selection set to the given lists of weights.
NewValidator creates a new instance of a validator.
NodesInfoToValidators maps nodeInfo to validator interface.
SerializableShardValidatorListToValidatorList creates the validator list from serializable validator list.
SerializableValidatorsToValidators creates the validator map from serializable validator map.
ValidatorArrayToSerializableValidatorArray -.

# Variables

ErrEpochNodesConfigDoesNotExist signals that the epoch nodes configuration is missing.
No description provided by the author
ErrInvalidConsensusGroupSize signals that the consensus size is invalid (e.g.
No description provided by the author
ErrInvalidNumberOfShards signals that an invalid number of shards was passed to the sharding registry.
ErrInvalidNumberPubKeys signals that an invalid number of public keys was used.
ErrInvalidSampleSize signals that an invalid sample size was provided.
ErrInvalidShardId signals that an invalid shard id was passed.
ErrInvalidWeight signals an invalid weight was provided.
ErrKeyNotFoundInWaitingList signals that the provided key has not been found in waiting list.
ErrMapSizeZero signals that there are no elements in the map.
ErrNilBlockBody signals that block body is nil.
ErrNilBootStorer signals that a nil boot storer was provided.
ErrNilCacher signals that a nil cacher has been provided.
ErrNilChanceComputer signals that a nil chance computer was provided.
ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided.
ErrNilEpochNotifier signals that a nil EpochNotifier has been provided.
ErrNilGenesisNodesSetupHandler signals that a nil genesis nodes setup handler has been provided.
ErrNilHasher signals that a nil hasher has been provided.
ErrNilInputNodesMap signals that a nil nodes map was provided.
ErrNilMarshalizer signals that the marshalizer is nil.
ErrNilNodesCoordinator signals that the nodesCoordinator is nil.
ErrNilNodesCoordinatorRegistryFactory signals that a nil nodes coordinator registry factory has been given.
ErrNilNodeShufflerArguments signals that a nil argument pointer was provided for creating the nodes shuffler instance.
ErrNilNodeStopChannel signals that a nil node stop channel has been provided.
ErrNilNodeTypeProvider signals that a nil node type provider has been given.
ErrNilOrEmptyDestinationForDistribute signals that a nil or empty value was provided for destination of distributedNodes.
ErrNilPreviousEpochConfig signals that the previous epoch config is nil.
ErrNilPubKey signals that the public key is nil.
ErrNilRandomness signals that a nil randomness source has been provided.
ErrNilRandomSelector signals that a nil selector was provided.
ErrNilShuffledOutHandler signals that a nil shuffled out handler has been provided.
ErrNilShuffler signals that a nil shuffler was provided.
ErrNilValidatorInfoCacher signals that a nil value for the validator info cacher has been provided.
ErrNilWeights signals that nil weights list was provided.
ErrNotImplemented signals a call of a non implemented functionality.
ErrReceivedAuctionValidatorsBeforeStakingV4 signals that auction nodes have been received from peer mini blocks before enabling staking v4.
ErrSmallMetachainEligibleListSize signals that the eligible validators list's size is less than the consensus size.
ErrSmallShardEligibleListSize signals that the eligible validators list's size is less than the consensus size.
No description provided by the author
ErrValidatorCannotBeFullArchive signals a configuration issue because a validator cannot be a full archive node.
ErrValidatorNotFound signals that the validator has not been found.
ErrWrongTypeAssertion signals wrong type assertion error.

# Structs

ArgNodesCoordinator holds all dependencies required by the nodes coordinator in order to create new instances.
ArgsUpdateNodes holds the parameters required by the shuffler to generate a new nodes configuration.
CrossShardValidatorDistributor - distributes validators from source to destination cross shards.
EpochValidators holds one epoch configuration for a nodes coordinator.
No description provided by the author
IntraShardValidatorDistributor - distributes validators from source to destination inside the same shard.
NodesCoordinatorRegistry holds the data that can be used to initialize a nodes coordinator.
No description provided by the author
NodesShufflerArgs defines the arguments required to create a nodes shuffler.
ResUpdateNodes holds the result of the UpdateNodes method.
SelectionBasedProvider will handle the returning of the consensus group by simulating a reslicing of the expanded eligible list.
No description provided by the author
No description provided by the author

# Interfaces

Cacher provides the capabilities needed to store and retrieve information needed in the NodesCoordinator.
ChanceComputer provides chance computation capabilities based on a rating.
EpochNotifier can notify upon an epoch change and provide the current epoch.
EpochsConfigUpdateHandler specifies the behaviour needed to update nodes config epochs.
EpochStartActionHandler defines the action taken on epoch start event.
EpochStartEventNotifier provides Register and Unregister functionality for the end of epoch events.
EpochValidatorsHandler defines what one epoch configuration for a nodes coordinator should hold.
EpochValidatorsHandlerWithAuction defines what one epoch configuration for a nodes coordinator should hold + shuffled out validators.
GenesisNodeInfoHandler defines the public methods for the genesis nodes info.
GenesisNodesSetupHandler defines a component able to provide the genesis nodes info.
NodesCoordinator defines the behaviour of a struct able to do validator group selection.
NodesCoordinatorHelper provides polymorphism functionality for nodesCoordinator.
NodesCoordinatorRegistryFactory handles NodesCoordinatorRegistryHandler marshall/unmarshall.
NodesCoordinatorRegistryHandler defines what is used to initialize nodes coordinator.
NodesShuffler provides shuffling functionality for nodes.
NodeTypeProviderHandler defines the actions needed for a component that can handle the node type.
PublicKeysSelector allows retrieval of eligible validators public keys.
RandomSelector selects randomly a subset of elements from a set of data.
ShuffledOutHandler defines the methods needed for the computation of a shuffled out event.
Validator defines a node that can be allocated to a shard for participation in a consensus group as validator or block proposer.
ValidatorsDistributor distributes validators across shards.