 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func NewFollower(log zerolog.Logger, committee hotstuff.DynamicCommittee, ...) (*hotstuff.FollowerLoop, error)
- func NewForks(final *flow.Header, headers storage.Headers, updater module.Finalizer, ...) (*forks.Forks, error)
- func NewParticipant(log zerolog.Logger, metrics module.HotstuffMetrics, builder module.Builder, ...) (*eventloop.EventLoop, error)
- func NewTimeoutAggregator(log zerolog.Logger, hotstuffMetrics module.HotstuffMetrics, ...) (hotstuff.TimeoutAggregator, error)
- func NewValidator(metrics module.HotstuffMetrics, committee hotstuff.DynamicCommittee) hotstuff.Validator
- func NewVoteAggregator(log zerolog.Logger, hotstuffMetrics module.HotstuffMetrics, ...) (hotstuff.VoteAggregator, error)
- type HotstuffModules
- type Option
- func WithBlockRateDelay(delay time.Duration) Option
- func WithConfigRegistrar(reg updatable_configs.Registrar) Option
- func WithHappyPathMaxRoundFailures(happyPathMaxRoundFailures uint64) Option
- func WithMinTimeout(timeout time.Duration) Option
- func WithStartupTime(time time.Time) Option
- func WithTimeoutAdjustmentFactor(factor float64) Option
 
- type ParticipantConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFollower ¶
func NewFollower(log zerolog.Logger, committee hotstuff.DynamicCommittee, headers storage.Headers, updater module.Finalizer, verifier hotstuff.Verifier, notifier hotstuff.FinalizationConsumer, rootHeader *flow.Header, rootQC *flow.QuorumCertificate, finalized *flow.Header, pending []*flow.Header) (*hotstuff.FollowerLoop, error)
func NewForks ¶ added in v0.23.9
func NewForks(final *flow.Header, headers storage.Headers, updater module.Finalizer, notifier hotstuff.FinalizationConsumer, rootHeader *flow.Header, rootQC *flow.QuorumCertificate) (*forks.Forks, error)
NewForks recovers trusted root and creates new forks manager
func NewParticipant ¶
func NewParticipant( log zerolog.Logger, metrics module.HotstuffMetrics, builder module.Builder, finalized *flow.Header, pending []*flow.Header, modules *HotstuffModules, options ...Option, ) (*eventloop.EventLoop, error)
NewParticipant initialize the EventLoop instance with needed dependencies
func NewTimeoutAggregator ¶ added in v0.29.0
func NewTimeoutAggregator(log zerolog.Logger, hotstuffMetrics module.HotstuffMetrics, engineMetrics module.EngineMetrics, mempoolMetrics module.MempoolMetrics, notifier *pubsub.Distributor, timeoutProcessorFactory hotstuff.TimeoutProcessorFactory, distributor *pubsub.TimeoutCollectorDistributor, lowestRetainedView uint64, ) (hotstuff.TimeoutAggregator, error)
NewTimeoutAggregator creates new TimeoutAggregator and connects Hotstuff event source with event handler. No error returns are expected during normal operations.
func NewValidator ¶ added in v0.23.9
func NewValidator(metrics module.HotstuffMetrics, committee hotstuff.DynamicCommittee) hotstuff.Validator
NewValidator creates new instance of hotstuff validator needed for votes & proposal validation
func NewVoteAggregator ¶ added in v0.23.9
func NewVoteAggregator( log zerolog.Logger, hotstuffMetrics module.HotstuffMetrics, engineMetrics module.EngineMetrics, mempoolMetrics module.MempoolMetrics, lowestRetainedView uint64, notifier hotstuff.Consumer, voteProcessorFactory hotstuff.VoteProcessorFactory, distributor *pubsub.FinalizationDistributor, ) (hotstuff.VoteAggregator, error)
NewVoteAggregator creates new VoteAggregator and subscribes for finalization events. No error returns are expected during normal operations.
Types ¶
type HotstuffModules ¶ added in v0.23.9
type HotstuffModules struct {
	Committee                   hotstuff.DynamicCommittee       // consensus committee
	Signer                      hotstuff.Signer                 // signer of proposal & votes
	Persist                     hotstuff.Persister              // last state of consensus participant
	Notifier                    *pubsub.Distributor             // observer for hotstuff events
	FinalizationDistributor     *pubsub.FinalizationDistributor // observer for finalization events, used by compliance engine
	QCCreatedDistributor        *pubsub.QCCreatedDistributor    // observer for qc created event, used by leader
	TimeoutCollectorDistributor *pubsub.TimeoutCollectorDistributor
	Forks                       hotstuff.Forks             // information about multiple forks
	Validator                   hotstuff.Validator         // validator of proposals & votes
	VoteAggregator              hotstuff.VoteAggregator    // aggregator of votes, used by leader
	TimeoutAggregator           hotstuff.TimeoutAggregator // aggregator of `TimeoutObject`s, used by every replica
}
    HotstuffModules is a helper structure to encapsulate dependencies to create a hotStuff participant.
type Option ¶
type Option func(*ParticipantConfig)
func WithBlockRateDelay ¶
func WithConfigRegistrar ¶ added in v0.28.13
func WithConfigRegistrar(reg updatable_configs.Registrar) Option
func WithHappyPathMaxRoundFailures ¶ added in v0.29.0
func WithMinTimeout ¶
func WithStartupTime ¶ added in v0.22.4
func WithTimeoutAdjustmentFactor ¶ added in v0.29.0
type ParticipantConfig ¶
type ParticipantConfig struct {
	StartupTime                         time.Time                   // the time when consensus participant enters first view
	TimeoutMinimum                      time.Duration               // the minimum timeout for the pacemaker
	TimeoutMaximum                      time.Duration               // the maximum timeout for the pacemaker
	TimeoutAdjustmentFactor             float64                     // the factor at which the timeout duration is adjusted
	HappyPathMaxRoundFailures           uint64                      // number of failed rounds before first timeout increase
	BlockRateDelay                      time.Duration               // a delay to broadcast block proposal in order to control the block production rate
	MaxTimeoutObjectRebroadcastInterval time.Duration               // maximum interval for timeout object rebroadcast
	Registrar                           updatable_configs.Registrar // optional: for registering HotStuff configs as dynamically configurable
}
    func DefaultParticipantConfig ¶ added in v0.28.13
func DefaultParticipantConfig() ParticipantConfig
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
          
            committees
            
            
          
           (c) 2020 Dapper Labs - ALL RIGHTS RESERVED | (c) 2020 Dapper Labs - ALL RIGHTS RESERVED | 
 Click to show internal directories. 
   Click to hide internal directories.