factory

package
v1.1.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: GPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountsDBSContainerFactory

func NewAccountsDBSContainerFactory(args ArgsNewAccountsDBSyncersContainerFactory) (*accountDBSyncersContainerFactory, error)

NewAccountsDBSContainerFactory creates a factory for trie syncers container

func NewDataTrieFactory

func NewDataTrieFactory(args ArgsNewDataTrieFactory) (*dataTrieFactory, error)

NewDataTrieFactory creates a data trie factory

func NewExportHandlerFactory

func NewExportHandlerFactory(args ArgsExporter) (*exportHandlerFactory, error)

NewExportHandlerFactory creates an exporter factory

func NewFullSyncInterceptorsContainerFactory

func NewFullSyncInterceptorsContainerFactory(
	args ArgsNewFullSyncInterceptorsContainerFactory,
) (*fullSyncInterceptorsContainerFactory, error)

NewFullSyncInterceptorsContainerFactory is responsible for creating a new interceptors factory object

func NewResolversContainerFactory

func NewResolversContainerFactory(args ArgsNewResolversContainerFactory) (*resolversContainerFactory, error)

NewResolversContainerFactory creates a new container filled with topic resolvers

Types

type ArgsExporter

type ArgsExporter struct {
	TxSignMarshalizer         marshal.Marshalizer
	Marshalizer               marshal.Marshalizer
	Hasher                    hashing.Hasher
	HeaderValidator           epochStart.HeaderValidator
	Uint64Converter           typeConverters.Uint64ByteSliceConverter
	DataPool                  dataRetriever.PoolsHolder
	StorageService            dataRetriever.StorageService
	RequestHandler            process.RequestHandler
	ShardCoordinator          sharding.Coordinator
	Messenger                 p2p.Messenger
	ActiveAccountsDBs         map[state.AccountsDbIdentifier]state.AccountsAdapter
	ExistingResolvers         dataRetriever.ResolversContainer
	ExportFolder              string
	ExportTriesStorageConfig  config.StorageConfig
	ExportStateStorageConfig  config.StorageConfig
	ExportStateKeysConfig     config.StorageConfig
	MaxTrieLevelInMemory      uint
	WhiteListHandler          process.WhiteListHandler
	WhiteListerVerifiedTxs    process.WhiteListHandler
	InterceptorsContainer     process.InterceptorsContainer
	MultiSigner               crypto.MultiSigner
	NodesCoordinator          sharding.NodesCoordinator
	SingleSigner              crypto.SingleSigner
	AddressPubKeyConverter    core.PubkeyConverter
	ValidatorPubKeyConverter  core.PubkeyConverter
	BlockKeyGen               crypto.KeyGenerator
	KeyGen                    crypto.KeyGenerator
	BlockSigner               crypto.SingleSigner
	HeaderSigVerifier         process.InterceptedHeaderSigVerifier
	HeaderIntegrityVerifier   process.HeaderIntegrityVerifier
	ValidityAttester          process.ValidityAttester
	InputAntifloodHandler     process.P2PAntifloodHandler
	OutputAntifloodHandler    process.P2PAntifloodHandler
	ChainID                   []byte
	RoundHandler              update.RoundHandler
	GenesisNodesSetupHandler  update.GenesisNodesSetupHandler
	InterceptorDebugConfig    config.InterceptorResolverDebugConfig
	MinTxVersion              uint32
	EnableSignTxWithHashEpoch uint32
	TxSignHasher              hashing.Hasher
	EpochNotifier             process.EpochNotifier
	MaxHardCapForMissingNodes int
	NumConcurrentTrieSyncers  int
	TrieSyncerVersion         int
}

ArgsExporter is the argument structure to create a new exporter

type ArgsNewAccountsDBSyncersContainerFactory

type ArgsNewAccountsDBSyncersContainerFactory struct {
	TrieCacher                storage.Cacher
	RequestHandler            update.RequestHandler
	ShardCoordinator          sharding.Coordinator
	Hasher                    hashing.Hasher
	Marshalizer               marshal.Marshalizer
	TrieStorageManager        data.StorageManager
	TimoutGettingTrieNode     time.Duration
	MaxTrieLevelInMemory      uint
	NumConcurrentTrieSyncers  int
	MaxHardCapForMissingNodes int
	TrieSyncerVersion         int
}

ArgsNewAccountsDBSyncersContainerFactory defines the arguments needed to create accounts DB syncers container

type ArgsNewDataTrieFactory

type ArgsNewDataTrieFactory struct {
	StorageConfig        config.StorageConfig
	SyncFolder           string
	Marshalizer          marshal.Marshalizer
	Hasher               hashing.Hasher
	ShardCoordinator     sharding.Coordinator
	MaxTrieLevelInMemory uint
}

ArgsNewDataTrieFactory is the argument structure for the new data trie factory

type ArgsNewFullSyncInterceptorsContainerFactory

type ArgsNewFullSyncInterceptorsContainerFactory struct {
	Accounts                  state.AccountsAdapter
	ShardCoordinator          sharding.Coordinator
	NodesCoordinator          sharding.NodesCoordinator
	Messenger                 process.TopicHandler
	Store                     dataRetriever.StorageService
	Marshalizer               marshal.Marshalizer
	TxSignMarshalizer         marshal.Marshalizer
	Hasher                    hashing.Hasher
	KeyGen                    crypto.KeyGenerator
	BlockSignKeyGen           crypto.KeyGenerator
	SingleSigner              crypto.SingleSigner
	BlockSingleSigner         crypto.SingleSigner
	MultiSigner               crypto.MultiSigner
	DataPool                  dataRetriever.PoolsHolder
	AddressPubkeyConverter    core.PubkeyConverter
	MaxTxNonceDeltaAllowed    int
	TxFeeHandler              process.FeeHandler
	BlockBlackList            process.TimeCacher
	HeaderSigVerifier         process.InterceptedHeaderSigVerifier
	HeaderIntegrityVerifier   process.HeaderIntegrityVerifier
	SizeCheckDelta            uint32
	ValidityAttester          process.ValidityAttester
	EpochStartTrigger         process.EpochStartTriggerHandler
	WhiteListHandler          update.WhiteListHandler
	WhiteListerVerifiedTxs    update.WhiteListHandler
	InterceptorsContainer     process.InterceptorsContainer
	AntifloodHandler          process.P2PAntifloodHandler
	NonceConverter            typeConverters.Uint64ByteSliceConverter
	ChainID                   []byte
	MinTxVersion              uint32
	EnableSignTxWithHashEpoch uint32
	TxSignHasher              hashing.Hasher
	EpochNotifier             process.EpochNotifier
}

ArgsNewFullSyncInterceptorsContainerFactory holds the arguments needed for fullSyncInterceptorsContainerFactory

type ArgsNewResolversContainerFactory

type ArgsNewResolversContainerFactory struct {
	ShardCoordinator           sharding.Coordinator
	Messenger                  dataRetriever.TopicMessageHandler
	Marshalizer                marshal.Marshalizer
	DataTrieContainer          state.TriesHolder
	ExistingResolvers          dataRetriever.ResolversContainer
	InputAntifloodHandler      dataRetriever.P2PAntifloodHandler
	OutputAntifloodHandler     dataRetriever.P2PAntifloodHandler
	NumConcurrentResolvingJobs int32
}

ArgsNewResolversContainerFactory defines the arguments for the resolversContainerFactory constructor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL