Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Phase ¶ added in v0.4.0
Phase is the implementation of the Selection step component.
func New ¶ added in v0.4.0
func New(e *consensus.Emitter, verifyFn consensus.CandidateVerificationFunc, timeOut time.Duration) *Phase
New creates and launches the component which responsibility is to reduce the candidates gathered as winner of the selection of all nodes in the committee and reduce them to just one candidate obtaining 64% of the committee vote. NB: we cannot push the agreement directly within the agreementChannel until we have a way to deduplicate it from the peer (the dupemap will not be notified of duplicates).
func (*Phase) Initialize ¶ added in v0.4.0
func (p *Phase) Initialize(re consensus.InternalPacket) consensus.PhaseFn
Initialize passes to this reduction step the best score collected during selection.
func (*Phase) Run ¶ added in v0.4.0
func (p *Phase) Run(ctx context.Context, queue *consensus.Queue, _, reductionChan chan message.Message, r consensus.RoundUpdate, step uint8) consensus.PhaseFn
Run the first reduction step until either there is a timeout, we reach 64% of votes, or we experience an unrecoverable error.