Documentation ¶
Index ¶
- Variables
- func AggregateErrors(errorStrings []string, baseError error) error
- func CreateBootstrapComponents(args ArgsBootstrapComponentsHolder) (*bootstrapComponentsHolder, error)
- func CreateCoreComponents(args ArgsCoreComponentsHolder) (*coreComponentsHolder, error)
- func CreateCryptoComponents(args ArgsCryptoComponentsHolder) (*cryptoComponentsHolder, error)
- func CreateDataComponents(args ArgsDataComponentsHolder) (*dataComponentsHolder, error)
- func CreateMemUnit() storage.Storer
- func CreateMemUnitForTries() storage.Storer
- func CreateNetworkComponents(network SyncedBroadcastNetworkHandler) (*networkComponentsHolder, error)
- func CreateProcessComponents(args ArgsProcessComponentsHolder) (*processComponentsHolder, error)
- func CreateStateComponents(args ArgsStateComponents) (*stateComponentsHolder, error)
- func CreateStatusComponents(shardID uint32, appStatusHandler core.AppStatusHandler, ...) (*statusComponentsHolder, error)
- func CreateStatusCoreComponents(configs config.Configs, coreComponents factory.CoreComponentsHolder) (*statusCoreComponentsHolder, error)
- func CreateStore(numOfShards uint32) dataRetriever.StorageService
- func NewCloseHandler() *closeHandler
- func NewInstantBroadcastMessenger(broadcastMessenger consensus.BroadcastMessenger, ...) (*instantBroadcastMessenger, error)
- func NewManualRoundHandler(genesisTimeStamp int64, roundDuration time.Duration, initialRound int64) *manualRoundHandler
- func NewSyncedBroadcastNetwork() *syncedBroadcastNetwork
- func NewSyncedMessenger(network SyncedBroadcastNetworkHandler) (*syncedMessenger, error)
- func NewTestOnlyProcessingNode(args ArgsTestOnlyProcessingNode) (*testOnlyProcessingNode, error)
- type APIConfigurator
- type ArgsBootstrapComponentsHolder
- type ArgsCoreComponentsHolder
- type ArgsCryptoComponentsHolder
- type ArgsDataComponentsHolder
- type ArgsProcessComponentsHolder
- type ArgsStateComponents
- type ArgsTestOnlyProcessingNode
- type SyncedBroadcastNetworkHandler
Constants ¶
This section is empty.
Variables ¶
var ErrClose = errors.New("error while closing inner components")
ErrClose signals that a close error occurred
Functions ¶
func AggregateErrors ¶
AggregateErrors can aggregate all provided error strings into a single error variable
func CreateBootstrapComponents ¶
func CreateBootstrapComponents(args ArgsBootstrapComponentsHolder) (*bootstrapComponentsHolder, error)
CreateBootstrapComponents will create a new instance of bootstrap components holder
func CreateCoreComponents ¶
func CreateCoreComponents(args ArgsCoreComponentsHolder) (*coreComponentsHolder, error)
CreateCoreComponents will create a new instance of factory.CoreComponentsHolder
func CreateCryptoComponents ¶
func CreateCryptoComponents(args ArgsCryptoComponentsHolder) (*cryptoComponentsHolder, error)
CreateCryptoComponents will create a new instance of cryptoComponentsHolder
func CreateDataComponents ¶
func CreateDataComponents(args ArgsDataComponentsHolder) (*dataComponentsHolder, error)
CreateDataComponents will create the data components holder
func CreateMemUnit ¶
CreateMemUnit creates a new in-memory storage unit
func CreateMemUnitForTries ¶
CreateMemUnitForTries returns a special type of storer used on tries instances
func CreateNetworkComponents ¶
func CreateNetworkComponents(network SyncedBroadcastNetworkHandler) (*networkComponentsHolder, error)
CreateNetworkComponents creates a new networkComponentsHolder instance
func CreateProcessComponents ¶
func CreateProcessComponents(args ArgsProcessComponentsHolder) (*processComponentsHolder, error)
CreateProcessComponents will create the process components holder
func CreateStateComponents ¶
func CreateStateComponents(args ArgsStateComponents) (*stateComponentsHolder, error)
CreateStateComponents will create the state components holder
func CreateStatusComponents ¶
func CreateStatusComponents(shardID uint32, appStatusHandler core.AppStatusHandler, statusPollingIntervalSec int, external config.ExternalConfig) (*statusComponentsHolder, error)
CreateStatusComponents will create a new instance of status components holder
func CreateStatusCoreComponents ¶
func CreateStatusCoreComponents(configs config.Configs, coreComponents factory.CoreComponentsHolder) (*statusCoreComponentsHolder, error)
CreateStatusCoreComponents will create a new instance of factory.StatusCoreComponentsHandler
func CreateStore ¶
func CreateStore(numOfShards uint32) dataRetriever.StorageService
CreateStore creates a storage service for shard nodes
func NewCloseHandler ¶
func NewCloseHandler() *closeHandler
NewCloseHandler create a new closeHandler instance
func NewInstantBroadcastMessenger ¶
func NewInstantBroadcastMessenger(broadcastMessenger consensus.BroadcastMessenger, shardCoordinator sharding.Coordinator) (*instantBroadcastMessenger, error)
NewInstantBroadcastMessenger creates a new instance of type instantBroadcastMessenger
func NewManualRoundHandler ¶
func NewManualRoundHandler(genesisTimeStamp int64, roundDuration time.Duration, initialRound int64) *manualRoundHandler
NewManualRoundHandler returns a manual round handler instance
func NewSyncedBroadcastNetwork ¶
func NewSyncedBroadcastNetwork() *syncedBroadcastNetwork
NewSyncedBroadcastNetwork creates a new synced broadcast network
func NewSyncedMessenger ¶
func NewSyncedMessenger(network SyncedBroadcastNetworkHandler) (*syncedMessenger, error)
NewSyncedMessenger creates a new synced network messenger
func NewTestOnlyProcessingNode ¶
func NewTestOnlyProcessingNode(args ArgsTestOnlyProcessingNode) (*testOnlyProcessingNode, error)
NewTestOnlyProcessingNode creates a new instance of a node that is able to only process transactions
Types ¶
type APIConfigurator ¶
APIConfigurator defines what an api configurator should be able to do
type ArgsBootstrapComponentsHolder ¶
type ArgsBootstrapComponentsHolder struct { CoreComponents factory.CoreComponentsHolder CryptoComponents factory.CryptoComponentsHolder NetworkComponents factory.NetworkComponentsHolder StatusCoreComponents factory.StatusCoreComponentsHolder WorkingDir string FlagsConfig config.ContextFlagsConfig ImportDBConfig config.ImportDbConfig PrefsConfig config.Preferences Config config.Config ShardIDStr string }
ArgsBootstrapComponentsHolder will hold the components needed for the bootstrap components holders
type ArgsCoreComponentsHolder ¶
type ArgsCoreComponentsHolder struct { Config config.Config EnableEpochsConfig config.EnableEpochs RoundsConfig config.RoundConfig EconomicsConfig config.EconomicsConfig RatingConfig config.RatingsConfig ChanStopNodeProcess chan endProcess.ArgEndProcess InitialRound int64 NodesSetupPath string GasScheduleFilename string NumShards uint32 WorkingDir string MinNodesPerShard uint32 MinNodesMeta uint32 RoundDurationInMs uint64 }
ArgsCoreComponentsHolder will hold arguments needed for the core components holder
type ArgsCryptoComponentsHolder ¶
type ArgsCryptoComponentsHolder struct { Config config.Config EnableEpochsConfig config.EnableEpochs Preferences config.Preferences CoreComponentsHolder factory.CoreComponentsHolder AllValidatorKeysPemFileName string BypassTxSignatureCheck bool }
ArgsCryptoComponentsHolder holds all arguments needed to create a crypto components holder
type ArgsDataComponentsHolder ¶
type ArgsDataComponentsHolder struct { Chain data.ChainHandler StorageService dataRetriever.StorageService DataPool dataRetriever.PoolsHolder InternalMarshaller marshal.Marshalizer }
ArgsDataComponentsHolder will hold the components needed for data components
type ArgsProcessComponentsHolder ¶
type ArgsProcessComponentsHolder struct { CoreComponents factory.CoreComponentsHolder CryptoComponents factory.CryptoComponentsHolder NetworkComponents factory.NetworkComponentsHolder BootstrapComponents factory.BootstrapComponentsHolder StateComponents factory.StateComponentsHolder DataComponents factory.DataComponentsHolder StatusComponents factory.StatusComponentsHolder StatusCoreComponents factory.StatusCoreComponentsHolder NodesCoordinator nodesCoordinator.NodesCoordinator EpochConfig config.EpochConfig RoundConfig config.RoundConfig ConfigurationPathsHolder config.ConfigurationPathsHolder FlagsConfig config.ContextFlagsConfig ImportDBConfig config.ImportDbConfig PrefsConfig config.Preferences Config config.Config EconomicsConfig config.EconomicsConfig SystemSCConfig config.SystemSmartContractsConfig GenesisNonce uint64 GenesisRound uint64 }
ArgsProcessComponentsHolder will hold the components needed for process components
type ArgsStateComponents ¶
type ArgsStateComponents struct { Config config.Config CoreComponents factory.CoreComponentsHolder StatusCore factory.StatusCoreComponentsHolder StoreService dataRetriever.StorageService ChainHandler chainData.ChainHandler }
ArgsStateComponents will hold the components needed for state components
type ArgsTestOnlyProcessingNode ¶
type ArgsTestOnlyProcessingNode struct { Configs config.Configs APIInterface APIConfigurator ChanStopNodeProcess chan endProcess.ArgEndProcess SyncedBroadcastNetwork SyncedBroadcastNetworkHandler InitialRound int64 InitialNonce uint64 GasScheduleFilename string NumShards uint32 ShardIDStr string BypassTxSignatureCheck bool MinNodesPerShard uint32 MinNodesMeta uint32 RoundDurationInMillis uint64 }
ArgsTestOnlyProcessingNode represents the DTO struct for the NewTestOnlyProcessingNode constructor function
type SyncedBroadcastNetworkHandler ¶
type SyncedBroadcastNetworkHandler interface { RegisterMessageReceiver(handler messageReceiver, pid core.PeerID) Broadcast(pid core.PeerID, topic string, buff []byte) SendDirectly(from core.PeerID, topic string, buff []byte, to core.PeerID) error GetConnectedPeers() []core.PeerID GetConnectedPeersOnTopic(topic string) []core.PeerID IsInterfaceNil() bool }
SyncedBroadcastNetworkHandler defines the synced network interface
Source Files ¶
- bootstrapComponents.go
- closeHandler.go
- coreComponents.go
- cryptoComponents.go
- dataComponents.go
- instantBroadcastMessenger.go
- interface.go
- manualRoundHandler.go
- memoryComponents.go
- networkComponents.go
- nodeFacade.go
- processComponents.go
- stateComponents.go
- statusComponents.go
- statusCoreComponents.go
- storageService.go
- syncedBroadcastNetwork.go
- syncedMessenger.go
- testOnlyProcessingNode.go