node_builder

package
v0.29.17-consensus-fix Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: AGPL-3.0 Imports: 77 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
	// 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.MutableState
	SyncCore                   *chainsync.Core
	RpcEng                     *rpc.Engine
	FinalizationDistributor    *consensuspubsub.FinalizationDistributor
	FinalizedHeader            *synceng.FinalizedHeaderCache
	CollectionRPC              access.AccessAPIClient
	TransactionTimings         *stdmap.TransactionTimings
	CollectionsToMarkFinalized *stdmap.Times
	CollectionsToMarkExecuted  *stdmap.Times
	BlocksToMarkExecuted       *stdmap.Times
	TransactionMetrics         module.TransactionMetrics
	AccessMetrics              module.AccessMetrics
	PingMetrics                module.PingMetrics
	Committee                  hotstuff.DynamicCommittee
	Finalized                  *flow.Header
	Pending                    []*flow.Header
	FollowerCore               module.HotStuffFollower
	Validator                  hotstuff.Validator
	ExecutionDataDownloader    execution_data.Downloader
	ExecutionDataRequester     state_synchronization.ExecutionDataRequester
	ExecutionDataStore         execution_data.ExecutionDataStore

	// 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.Engine
	SyncEng        *synceng.Engine
	StateStreamEng *state_stream.Engine
}

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) BuildExecutionDataRequester added in v0.26.2

func (builder *FlowAccessNodeBuilder) BuildExecutionDataRequester() *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.Network
	Metrics     module.NetworkMetrics
}

Jump to

Keyboard shortcuts

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