Documentation ¶
Index ¶
- func NewEpochStartBootstrap(args ArgsEpochStartBootstrap) (*epochStartBootstrap, error)
- func NewEpochStartMetaBlockProcessor(messenger Messenger, handler RequestHandler, marshalizer marshal.Marshalizer, ...) (*epochStartMetaBlockProcessor, error)
- func NewEpochStartMetaSyncer(args ArgsNewEpochStartMetaSyncer) (*epochStartMetaSyncer, error)
- func NewMetaStorageHandler(generalConfig config.Config, shardCoordinator sharding.Coordinator, ...) (*metaStorageHandler, error)
- func NewShardStorageHandler(generalConfig config.Config, shardCoordinator sharding.Coordinator, ...) (*shardStorageHandler, error)
- func NewSyncValidatorStatus(args ArgsNewSyncValidatorStatus) (*syncValidatorStatus, error)
- type ArgsEpochStartBootstrap
- type ArgsNewEpochStartMetaSyncer
- type ArgsNewSyncValidatorStatus
- type ComponentsNeededForBootstrap
- type EpochStartMetaBlockInterceptorProcessor
- type Messenger
- type Parameters
- type RequestHandler
- type StartInEpochNodesCoordinator
- type StartOfEpochNodesConfigHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEpochStartBootstrap ¶
func NewEpochStartBootstrap(args ArgsEpochStartBootstrap) (*epochStartBootstrap, error)
NewEpochStartBootstrap will return a new instance of epochStartBootstrap
func NewEpochStartMetaBlockProcessor ¶
func NewEpochStartMetaBlockProcessor( messenger Messenger, handler RequestHandler, marshalizer marshal.Marshalizer, hasher hashing.Hasher, consensusPercentage uint8, minNumConnectedPeersConfig int, minNumOfPeersToConsiderBlockValidConfig int, ) (*epochStartMetaBlockProcessor, error)
NewEpochStartMetaBlockProcessor will return a interceptor processor for epoch start meta block
func NewEpochStartMetaSyncer ¶
func NewEpochStartMetaSyncer(args ArgsNewEpochStartMetaSyncer) (*epochStartMetaSyncer, error)
NewEpochStartMetaSyncer will return a new instance of epochStartMetaSyncer
func NewMetaStorageHandler ¶
func NewMetaStorageHandler( generalConfig config.Config, shardCoordinator sharding.Coordinator, pathManagerHandler storage.PathManagerHandler, marshalizer marshal.Marshalizer, hasher hashing.Hasher, currentEpoch uint32, uint64Converter typeConverters.Uint64ByteSliceConverter, ) (*metaStorageHandler, error)
NewMetaStorageHandler will return a new instance of metaStorageHandler
func NewShardStorageHandler ¶
func NewShardStorageHandler( generalConfig config.Config, shardCoordinator sharding.Coordinator, pathManagerHandler storage.PathManagerHandler, marshalizer marshal.Marshalizer, hasher hashing.Hasher, currentEpoch uint32, uint64Converter typeConverters.Uint64ByteSliceConverter, ) (*shardStorageHandler, error)
NewShardStorageHandler will return a new instance of shardStorageHandler
func NewSyncValidatorStatus ¶
func NewSyncValidatorStatus(args ArgsNewSyncValidatorStatus) (*syncValidatorStatus, error)
NewSyncValidatorStatus creates a new validator status process component
Types ¶
type ArgsEpochStartBootstrap ¶
type ArgsEpochStartBootstrap struct { DestinationShardAsObserver uint32 WorkingDir string DefaultDBPath string DefaultEpochString string DefaultShardString string PublicKey crypto.PublicKey Marshalizer marshal.Marshalizer TxSignMarshalizer marshal.Marshalizer Hasher hashing.Hasher Messenger Messenger GeneralConfig config.Config EconomicsData *economics.EconomicsData SingleSigner crypto.SingleSigner BlockSingleSigner crypto.SingleSigner KeyGen crypto.KeyGenerator BlockKeyGen crypto.KeyGenerator GenesisNodesConfig sharding.GenesisNodesSetupHandler GenesisShardCoordinator sharding.Coordinator PathManager storage.PathManagerHandler StorageUnitOpener storage.UnitOpenerHandler LatestStorageDataProvider storage.LatestStorageDataProviderHandler Rater sharding.ChanceComputer Uint64Converter typeConverters.Uint64ByteSliceConverter NodeShuffler sharding.NodesShuffler Rounder epochStart.Rounder AddressPubkeyConverter core.PubkeyConverter }
ArgsEpochStartBootstrap holds the arguments needed for creating an epoch start data provider component
type ArgsNewEpochStartMetaSyncer ¶
type ArgsNewEpochStartMetaSyncer struct { RequestHandler RequestHandler Messenger Messenger Marshalizer marshal.Marshalizer TxSignMarshalizer marshal.Marshalizer ShardCoordinator sharding.Coordinator KeyGen crypto.KeyGenerator BlockKeyGen crypto.KeyGenerator Hasher hashing.Hasher Signer crypto.SingleSigner BlockSigner crypto.SingleSigner ChainID []byte EconomicsData *economics.EconomicsData WhitelistHandler process.WhiteListHandler AddressPubkeyConv core.PubkeyConverter NonceConverter typeConverters.Uint64ByteSliceConverter StartInEpochConfig config.EpochStartConfig }
ArgsNewEpochStartMetaSyncer -
type ArgsNewSyncValidatorStatus ¶
type ArgsNewSyncValidatorStatus struct { DataPool dataRetriever.PoolsHolder Marshalizer marshal.Marshalizer Hasher hashing.Hasher RequestHandler process.RequestHandler ChanceComputer sharding.ChanceComputer GenesisNodesConfig sharding.GenesisNodesSetupHandler NodeShuffler sharding.NodesShuffler PubKey []byte ShardIdAsObserver uint32 }
ArgsNewSyncValidatorStatus holds the arguments needed for creating a new validator status process component
type ComponentsNeededForBootstrap ¶
type ComponentsNeededForBootstrap struct { EpochStartMetaBlock *block.MetaBlock PreviousEpochStart *block.MetaBlock ShardHeader *block.Header NodesConfig *sharding.NodesCoordinatorRegistry Headers map[string]data.HeaderHandler ShardCoordinator sharding.Coordinator UserAccountTries map[string]data.Trie PeerAccountTries map[string]data.Trie PendingMiniBlocks map[string]*block.MiniBlock }
ComponentsNeededForBootstrap holds the components which need to be initialized from network
type EpochStartMetaBlockInterceptorProcessor ¶ added in v1.0.116
type EpochStartMetaBlockInterceptorProcessor interface { process.InterceptorProcessor GetEpochStartMetaBlock(ctx context.Context) (*block.MetaBlock, error) }
EpochStartMetaBlockInterceptorProcessor defines the methods to sync an epoch start metablock
type Messenger ¶
type Messenger interface { dataRetriever.MessageHandler dataRetriever.TopicHandler UnregisterMessageProcessor(topic string) error UnregisterAllMessageProcessors() error ConnectedPeers() []p2p.PeerID }
Messenger defines which methods a p2p messenger should implement
type Parameters ¶
type Parameters struct { Epoch uint32 SelfShardId uint32 NumOfShards uint32 NodesConfig *sharding.NodesCoordinatorRegistry }
Parameters defines the DTO for the result produced by the bootstrap component
type RequestHandler ¶
type RequestHandler interface { RequestStartOfEpochMetaBlock(epoch uint32) SetNumPeersToQuery(topic string, intra int, cross int) error GetNumPeersToQuery(topic string) (int, int, error) IsInterfaceNil() bool }
RequestHandler defines which methods a request handler should implement
type StartInEpochNodesCoordinator ¶
type StartInEpochNodesCoordinator interface { EpochStartPrepare(metaHdr data.HeaderHandler, body data.BodyHandler) NodesCoordinatorToRegistry() *sharding.NodesCoordinatorRegistry ShardIdForEpoch(epoch uint32) (uint32, error) IsInterfaceNil() bool }
StartInEpochNodesCoordinator defines the methods to process and save nodesCoordinator information to storage
type StartOfEpochNodesConfigHandler ¶
type StartOfEpochNodesConfigHandler interface { NodesConfigFromMetaBlock(currMetaBlock *block.MetaBlock, prevMetaBlock *block.MetaBlock) (*sharding.NodesCoordinatorRegistry, uint32, error) IsInterfaceNil() bool }
StartOfEpochNodesConfigHandler defines the methods to process nodesConfig from epoch start metablocks