Documentation ¶
Index ¶
- Constants
- func CreateLatestStorageDataProvider(bootstrapDataProvider storageFactory.BootstrapDataProviderHandler, ...) (storage.LatestStorageDataProviderHandler, error)
- func CreateSoftwareVersionChecker(statusHandler core.AppStatusHandler) (*softwareVersion.SoftwareVersionChecker, error)
- func CreateStatusHandlers(arguments *ArgStatusHandlers) (*statusHandlersInfo, error)
- func CreateUnitOpener(bootstrapDataProvider storageFactory.BootstrapDataProviderHandler, ...) (storage.UnitOpenerHandler, error)
- func NewProcessComponentsFactoryArgs(coreComponents *mainFactory.CoreComponentsFactoryArgs, ...) *processComponentsFactoryArgs
- func PrepareNetworkShardingCollector(network *mainFactory.NetworkComponents, config *config.Config, ...) (*networksharding.PeerShardMapper, error)
- type ArgStatusHandlers
- type EpochStartNotifier
- type HeaderSigVerifierHandler
- type P2PAntifloodHandler
- type Process
Constants ¶
const (
// MaxTxsToRequest specifies the maximum number of txs to request
MaxTxsToRequest = 1000
)
Variables ¶
This section is empty.
Functions ¶
func CreateLatestStorageDataProvider ¶ added in v1.0.111
func CreateLatestStorageDataProvider( bootstrapDataProvider storageFactory.BootstrapDataProviderHandler, marshalizer marshal.Marshalizer, hasher hashing.Hasher, generalConfig config.Config, chainID string, workingDir string, defaultDBPath string, defaultEpochString string, defaultShardString string, ) (storage.LatestStorageDataProviderHandler, error)
CreateLatestStorageDataProvider will create a latest storage data provider handler
func CreateSoftwareVersionChecker ¶
func CreateSoftwareVersionChecker(statusHandler core.AppStatusHandler) (*softwareVersion.SoftwareVersionChecker, error)
CreateSoftwareVersionChecker will create a new software version checker and will start check if a new software version is available
func CreateStatusHandlers ¶
func CreateStatusHandlers(arguments *ArgStatusHandlers) (*statusHandlersInfo, error)
CreateStatusHandlers will return a slice of status handlers
func CreateUnitOpener ¶ added in v1.0.111
func CreateUnitOpener( bootstrapDataProvider storageFactory.BootstrapDataProviderHandler, latestDataFromStorageProvider storage.LatestStorageDataProviderHandler, internalMarshalizer marshal.Marshalizer, generalConfig config.Config, chainID string, workingDir string, defaultDBPath string, defaultEpochString string, defaultShardString string, ) (storage.UnitOpenerHandler, error)
CreateUnitOpener will create a new unit opener handler
func NewProcessComponentsFactoryArgs ¶
func NewProcessComponentsFactoryArgs( coreComponents *mainFactory.CoreComponentsFactoryArgs, genesisConfig *sharding.Genesis, economicsData *economics.EconomicsData, nodesConfig *sharding.NodesSetup, gasSchedule map[string]map[string]uint64, rounder consensus.Rounder, shardCoordinator sharding.Coordinator, nodesCoordinator sharding.NodesCoordinator, data *mainFactory.DataComponents, coreData *mainFactory.CoreComponents, crypto *mainFactory.CryptoComponents, state *mainFactory.StateComponents, network *mainFactory.NetworkComponents, tries *mainFactory.TriesComponents, coreServiceContainer serviceContainer.Core, requestedItemsHandler dataRetriever.RequestedItemsHandler, whiteListHandler process.WhiteListHandler, whiteListerVerifiedTxs process.WhiteListHandler, epochStartNotifier EpochStartNotifier, epochStart *config.EpochStartConfig, startEpochNum uint32, rater sharding.PeerAccountListAndRatingHandler, sizeCheckDelta uint32, stateCheckpointModulus uint, maxComputableRounds uint64, numConcurrentResolverJobs int32, minSizeInBytes uint32, maxSizeInBytes uint32, maxRating uint32, validatorPubkeyConverter state.PubkeyConverter, ratingsData process.RatingsInfoHandler, ) *processComponentsFactoryArgs
NewProcessComponentsFactoryArgs initializes the arguments necessary for creating the process components
func PrepareNetworkShardingCollector ¶
func PrepareNetworkShardingCollector( network *mainFactory.NetworkComponents, config *config.Config, nodesCoordinator sharding.NodesCoordinator, coordinator sharding.Coordinator, epochStartRegistrationHandler epochStart.RegistrationHandler, epochShard uint32, ) (*networksharding.PeerShardMapper, error)
PrepareNetworkShardingCollector will create the network sharding collector and apply it to the network messenger
Types ¶
type ArgStatusHandlers ¶
type ArgStatusHandlers struct { LogViewName string ServersConfigurationFileName string Ctx *cli.Context Marshalizer marshal.Marshalizer Uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter }
ArgStatusHandlers is a struct that stores arguments needed to create status handlers
func NewStatusHandlersFactoryArgs ¶
func NewStatusHandlersFactoryArgs( logViewName string, ctx *cli.Context, marshalizer marshal.Marshalizer, uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter, ) *ArgStatusHandlers
NewStatusHandlersFactoryArgs will return arguments for status handlers
type EpochStartNotifier ¶
type EpochStartNotifier interface { RegisterHandler(handler epochStart.ActionHandler) UnregisterHandler(handler epochStart.ActionHandler) NotifyAll(hdr data.HeaderHandler) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler) IsInterfaceNil() bool }
EpochStartNotifier defines which actions should be done for handling new epoch's events
type HeaderSigVerifierHandler ¶
type HeaderSigVerifierHandler interface { VerifyRandSeed(header data.HeaderHandler) error VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error VerifySignature(header data.HeaderHandler) error IsInterfaceNil() bool }
HeaderSigVerifierHandler is the interface needed to check a header if is correct
type P2PAntifloodHandler ¶
type P2PAntifloodHandler interface { CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error CanProcessMessagesOnTopic(peer p2p.PeerID, topic string, numMessages uint32) error ResetForTopic(topic string) SetMaxMessagesForTopic(topic string, maxNum uint32) IsInterfaceNil() bool }
P2PAntifloodHandler defines the behavior of a component able to signal that the system is too busy (or flooded) processing p2p messages
type Process ¶
type Process struct { InterceptorsContainer process.InterceptorsContainer ResolversFinder dataRetriever.ResolversFinder Rounder consensus.Rounder EpochStartTrigger epochStart.TriggerHandler ForkDetector process.ForkDetector BlockProcessor process.BlockProcessor BlackListHandler process.BlackListHandler BootStorer process.BootStorer HeaderSigVerifier HeaderSigVerifierHandler ValidatorsStatistics process.ValidatorStatisticsProcessor ValidatorsProvider process.ValidatorsProvider BlockTracker process.BlockTracker PendingMiniBlocksHandler process.PendingMiniBlocksHandler RequestHandler process.RequestHandler }
Process struct holds the process components
func ProcessComponentsFactory ¶
ProcessComponentsFactory creates the process components