simplehotstuff

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 2 Imported by: 0

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

func New

func New() consensus.Rules

New returns a new SimpleHotStuff instance.

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.

Jump to

Keyboard shortcuts

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