Documentation ¶
Index ¶
- type EventLoop
- func (el *EventLoop) OnNewQcDiscovered(qc *flow.QuorumCertificate)
- func (el *EventLoop) OnNewTcDiscovered(tc *flow.TimeoutCertificate)
- func (el *EventLoop) OnPartialTcCreated(view uint64, newestQC *flow.QuorumCertificate, ...)
- func (el *EventLoop) OnQcConstructedFromVotes(qc *flow.QuorumCertificate)
- func (el *EventLoop) OnTcConstructedFromTimeouts(tc *flow.TimeoutCertificate)
- func (el *EventLoop) OnTimeoutProcessed(timeout *model.TimeoutObject)
- func (el *EventLoop) OnVoteProcessed(vote *model.Vote)
- func (el *EventLoop) SubmitProposal(proposal *model.Proposal)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventLoop ¶
type EventLoop struct { *component.ComponentManager // contains filtered or unexported fields }
EventLoop buffers all incoming events to the hotstuff EventHandler, and feeds EventHandler one event at a time.
func NewEventLoop ¶
func NewEventLoop( log zerolog.Logger, metrics module.HotstuffMetrics, mempoolMetrics module.MempoolMetrics, eventHandler hotstuff.EventHandler, startTime time.Time, ) (*EventLoop, error)
NewEventLoop creates an instance of EventLoop.
func (*EventLoop) OnNewQcDiscovered ¶ added in v0.29.0
func (el *EventLoop) OnNewQcDiscovered(qc *flow.QuorumCertificate)
OnNewQcDiscovered pushes already validated QCs that were submitted from TimeoutAggregator to the event handler
func (*EventLoop) OnNewTcDiscovered ¶ added in v0.29.0
func (el *EventLoop) OnNewTcDiscovered(tc *flow.TimeoutCertificate)
OnNewTcDiscovered pushes already validated TCs that were submitted from TimeoutAggregator to the event handler
func (*EventLoop) OnPartialTcCreated ¶ added in v0.29.0
func (el *EventLoop) OnPartialTcCreated(view uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate)
OnPartialTcCreated created a hotstuff.PartialTcCreated payload and pushes it into partialTcCreated buffered channel for further processing by EventHandler. Since we use buffered channel this function can block if buffer is full.
func (*EventLoop) OnQcConstructedFromVotes ¶ added in v0.29.0
func (el *EventLoop) OnQcConstructedFromVotes(qc *flow.QuorumCertificate)
OnQcConstructedFromVotes implements hotstuff.VoteCollectorConsumer and pushes received qc into processing pipeline.
func (*EventLoop) OnTcConstructedFromTimeouts ¶ added in v0.29.0
func (el *EventLoop) OnTcConstructedFromTimeouts(tc *flow.TimeoutCertificate)
OnTcConstructedFromTimeouts pushes the received TC to the timeoutCertificates channel
func (*EventLoop) OnTimeoutProcessed ¶ added in v0.31.0
func (el *EventLoop) OnTimeoutProcessed(timeout *model.TimeoutObject)
OnTimeoutProcessed implements hotstuff.TimeoutCollectorConsumer and is no-op
func (*EventLoop) OnVoteProcessed ¶ added in v0.31.0
OnVoteProcessed implements hotstuff.VoteCollectorConsumer and is no-op
func (*EventLoop) SubmitProposal ¶
SubmitProposal pushes the received block to the proposals channel