node_builder

package
v0.27.0-pre-release-1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: AGPL-3.0 Imports: 64 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapIdentities

func BootstrapIdentities(addresses []string, keys []string) (flow.IdentityList, error)

BootstrapIdentities converts the bootstrap node addresses and keys to a Flow Identity list where each Flow Identity is initialized with the passed address, the networking key and the Node ID set to ZeroID, role set to Access, 0 stake and no staking key.

Types

type ObserverServiceBuilder

type ObserverServiceBuilder struct {
	*cmd.FlowNodeBuilder
	*ObserverServiceConfig

	// components
	LibP2PNode              *p2p.Node
	FollowerState           protocol.MutableState
	SyncCore                *synchronization.Core
	RpcEng                  *rpc.Engine
	FinalizationDistributor *pubsub.FinalizationDistributor
	FinalizedHeader         *synceng.FinalizedHeaderCache
	Committee               hotstuff.Committee
	Finalized               *flow.Header
	Pending                 []*flow.Header
	FollowerCore            module.HotStuffFollower
	ExecutionDataService    state_synchronization.ExecutionDataService
	ExecutionDataRequester  state_synchronization.ExecutionDataRequester // for the observer, the sync engine participants provider is the libp2p peer store 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() id.IdentifierProvider

	// engines
	FollowerEng *followereng.Engine
	SyncEng     *synceng.Engine
	// contains filtered or unexported fields
}

ObserverServiceBuilder provides the common functionality needed to bootstrap a Flow observer service It is composed of the FlowNodeBuilder, the ObserverServiceConfig and contains all the components and modules needed for the observers

func NewFlowObserverServiceBuilder

func NewFlowObserverServiceBuilder(opts ...Option) *ObserverServiceBuilder

func (*ObserverServiceBuilder) Build

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

Build enqueues the sync engine and the follower engine for the observer. Currently, the observer only runs the follower engine.

func (*ObserverServiceBuilder) BuildConsensusFollower

func (builder *ObserverServiceBuilder) BuildConsensusFollower() cmd.NodeBuilder

func (*ObserverServiceBuilder) BuildExecutionDataRequester

func (builder *ObserverServiceBuilder) BuildExecutionDataRequester() *ObserverServiceBuilder

func (*ObserverServiceBuilder) InitIDProviders

func (builder *ObserverServiceBuilder) InitIDProviders()

func (*ObserverServiceBuilder) Initialize

func (builder *ObserverServiceBuilder) Initialize() error

func (*ObserverServiceBuilder) ParseFlags

func (builder *ObserverServiceBuilder) ParseFlags() error

type ObserverServiceConfig

type ObserverServiceConfig struct {
	// contains filtered or unexported fields
}

ObserverServiceConfig 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 DefaultObserverServiceConfig

func DefaultObserverServiceConfig() *ObserverServiceConfig

DefaultObserverServiceConfig defines all the default values for the ObserverServiceConfig

type Option

type Option func(*ObserverServiceConfig)

Jump to

Keyboard shortcuts

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