Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is responsible for validating QC, Block and Vote
func New ¶
func New(committee hotstuff.Committee, forks hotstuff.ForksReader, verifier hotstuff.Verifier) *Validator
New creates a new Validator instance
func (*Validator) ValidateProposal ¶
ValidateProposal validates the block proposal A block is considered as valid if it's a valid extension of existing forks. Note it doesn't check if it's conflicting with finalized block
func (*Validator) ValidateQC ¶
ValidateQC validates the QC qc - the qc to be validated block - the block that the qc is pointing to
func (*Validator) ValidateVote ¶
ValidateVote validates the vote and returns the identity of the voter who signed vote - the vote to be validated block - the voting block. Assuming the block has been validated.
type ValidatorMetricsWrapper ¶
type ValidatorMetricsWrapper struct {
// contains filtered or unexported fields
}
ValidatorMetricsWrapper implements the hotstuff.Validator interface. It wraps a hotstuff.Validator instance and measures the time which the HotStuff's core logic spends in the hotstuff.Validator component, i.e. the with verifying higher-level consensus messages. The measured time durations are reported as values for the ValidatorProcessingDuration metric.
func NewMetricsWrapper ¶
func NewMetricsWrapper(validator hotstuff.Validator, metrics module.HotstuffMetrics) *ValidatorMetricsWrapper
func (ValidatorMetricsWrapper) ValidateProposal ¶
func (w ValidatorMetricsWrapper) ValidateProposal(proposal *model.Proposal) error
func (ValidatorMetricsWrapper) ValidateQC ¶
func (w ValidatorMetricsWrapper) ValidateQC(qc *flow.QuorumCertificate, block *model.Block) error