node_builder

package
v0.33.17 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 96 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessNodeConfig

type AccessNodeConfig struct {
	ExecutionNodeAddress string // deprecated
	HistoricalAccessRPCs []access.AccessAPIClient

	PublicNetworkConfig      PublicNetworkConfig
	TxResultCacheSize        uint
	TxErrorMessagesCacheSize uint
	// contains filtered or unexported fields
}

AccessNodeConfig defines all the user defined parameters required to bootstrap an access node For a node running as a standalone process, the config fields will be populated from the command line params, while for a node running as a library, the config fields are expected to be initialized by the caller.

func DefaultAccessNodeConfig

func DefaultAccessNodeConfig() *AccessNodeConfig

DefaultAccessNodeConfig defines all the default values for the AccessNodeConfig

type FlowAccessNodeBuilder

type FlowAccessNodeBuilder struct {
	*cmd.FlowNodeBuilder
	*AccessNodeConfig

	// components
	FollowerState              protocol.FollowerState
	SyncCore                   *chainsync.Core
	RpcEng                     *rpc.Engine
	FollowerDistributor        *consensuspubsub.FollowerDistributor
	CollectionRPC              access.AccessAPIClient
	TransactionTimings         *stdmap.TransactionTimings
	CollectionsToMarkFinalized *stdmap.Times
	CollectionsToMarkExecuted  *stdmap.Times
	BlocksToMarkExecuted       *stdmap.Times
	TransactionMetrics         *metrics.TransactionCollector
	RestMetrics                *metrics.RestCollector
	AccessMetrics              module.AccessMetrics
	PingMetrics                module.PingMetrics
	Committee                  hotstuff.DynamicCommittee
	Finalized                  *flow.Header // latest finalized block that the node knows of at startup time
	Pending                    []*flow.Header
	FollowerCore               module.HotStuffFollower
	Validator                  hotstuff.Validator
	ExecutionDataDownloader    execution_data.Downloader
	PublicBlobService          network.BlobService
	ExecutionDataRequester     state_synchronization.ExecutionDataRequester
	ExecutionDataStore         execution_data.ExecutionDataStore
	ExecutionDataCache         *execdatacache.ExecutionDataCache
	ExecutionIndexer           *indexer.Indexer
	ExecutionIndexerCore       *indexer.IndexerCore
	ScriptExecutor             *backend.ScriptExecutor
	RegistersAsyncStore        *execution.RegistersAsyncStore
	EventsIndex                *backend.EventsIndex
	TxResultsIndex             *backend.TransactionResultsIndex
	IndexerDependencies        *cmd.DependencyList

	// The sync engine participants provider is the libp2p peer store for the access node
	// which is not available until after the network has started.
	// Hence, a factory function that needs to be called just before creating the sync engine
	SyncEngineParticipantsProviderFactory func() module.IdentifierProvider

	// engines
	IngestEng      *ingestion.Engine
	RequestEng     *requester.Engine
	FollowerEng    *followereng.ComplianceEngine
	SyncEng        *synceng.Engine
	StateStreamEng *statestreambackend.Engine
	// contains filtered or unexported fields
}

FlowAccessNodeBuilder provides the common functionality needed to bootstrap a Flow access node It is composed of the FlowNodeBuilder, the AccessNodeConfig and contains all the components and modules needed for the access nodes

func FlowAccessNode

func FlowAccessNode(nodeBuilder *cmd.FlowNodeBuilder) *FlowAccessNodeBuilder

func (*FlowAccessNodeBuilder) Build

func (builder *FlowAccessNodeBuilder) Build() (cmd.Node, error)

func (*FlowAccessNodeBuilder) BuildConsensusFollower

func (builder *FlowAccessNodeBuilder) BuildConsensusFollower() *FlowAccessNodeBuilder

func (*FlowAccessNodeBuilder) BuildExecutionSyncComponents added in v0.32.0

func (builder *FlowAccessNodeBuilder) BuildExecutionSyncComponents() *FlowAccessNodeBuilder

func (*FlowAccessNodeBuilder) InitIDProviders added in v0.27.0

func (builder *FlowAccessNodeBuilder) InitIDProviders()

func (*FlowAccessNodeBuilder) Initialize added in v0.27.0

func (builder *FlowAccessNodeBuilder) Initialize() error

func (*FlowAccessNodeBuilder) ParseFlags

func (builder *FlowAccessNodeBuilder) ParseFlags() error

type PublicNetworkConfig added in v0.23.9

type PublicNetworkConfig struct {
	// NetworkKey crypto.PublicKey // TODO: do we need a different key for the public network?
	BindAddress string
	Network     network.EngineRegistry
	Metrics     module.NetworkMetrics
}

Jump to

Keyboard shortcuts

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