blockproducer

package
v0.37.0-crescendo-RC3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: AGPL-3.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockBuilderMetricsWrapper

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

BlockBuilderMetricsWrapper implements the module.Builder interface. It wraps a module.Builder instance and measures the time which HotStuff's core logic spends in the module.Builder component, i.e. the with generating block payloads. The measured time durations are reported as values for the PayloadProductionDuration metric.

func NewMetricsWrapper

func NewMetricsWrapper(builder module.Builder, metrics module.HotstuffMetrics) *BlockBuilderMetricsWrapper

func (BlockBuilderMetricsWrapper) BuildOn

func (w BlockBuilderMetricsWrapper) BuildOn(parentID flow.Identifier, setter func(*flow.Header) error, sign func(*flow.Header) error) (*flow.Header, error)

type BlockProducer

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

BlockProducer is responsible for producing new block proposals

func New

func New(signer hotstuff.Signer, committee hotstuff.Replicas, builder module.Builder) (*BlockProducer, error)

New creates a new BlockProducer which wraps the chain compliance layer block builder to provide hotstuff with block proposals. No errors are expected during normal operation.

func (*BlockProducer) MakeBlockProposal

func (bp *BlockProducer) MakeBlockProposal(view uint64, qc *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*flow.Header, error)

MakeBlockProposal builds a new HotStuff block proposal using the given view, the given quorum certificate for its parent and [optionally] a timeout certificate for last view(could be nil). No errors are expected during normal operation.

Jump to

Keyboard shortcuts

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