node_builder

package
v0.33.10-temp-script-i... Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: AGPL-3.0 Imports: 73 Imported by: 1

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.LibP2PNode
	FollowerState       stateprotocol.FollowerState
	SyncCore            *chainsync.Core
	RpcEng              *rpc.Engine
	FollowerDistributor *pubsub.FollowerDistributor
	Committee           hotstuff.DynamicCommittee
	Finalized           *flow.Header
	Pending             []*flow.Header
	FollowerCore        module.HotStuffFollower

	// 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
	FollowerEng *follower.ComplianceEngine
	SyncEng     *synceng.Engine

	RestMetrics   *metrics.RestCollector
	AccessMetrics module.AccessMetrics
	// 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) 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