Documentation ¶
Overview ¶
Package simplehotstuff implements a simplified version of the three-chain HotStuff protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SimpleHotStuff ¶
type SimpleHotStuff struct {
// contains filtered or unexported fields
}
SimpleHotStuff implements a simplified version of the HotStuff algorithm.
Based on the simplified algorithm described in the paper "Formal Verification of HotStuff" by Leander Jehl.
func (*SimpleHotStuff) CommitRule ¶
func (hs *SimpleHotStuff) CommitRule(block *consensus.Block) *consensus.Block
CommitRule decides if an ancestor of the block can be committed, and returns the ancestor, otherwise returns nil.
func (*SimpleHotStuff) InitConsensusModule ¶
func (hs *SimpleHotStuff) InitConsensusModule(mods *consensus.Modules, _ *consensus.OptionsBuilder)
InitConsensusModule gives the module a reference to the Modules object. It also allows the module to set module options using the OptionsBuilder.
func (*SimpleHotStuff) VoteRule ¶
func (hs *SimpleHotStuff) VoteRule(proposal consensus.ProposeMsg) bool
VoteRule decides if the replica should vote for the given block.
Click to show internal directories.
Click to hide internal directories.