simplehotstuff

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 4 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) ChainLength added in v0.5.0

func (hs *SimpleHotStuff) ChainLength() int

ChainLength returns the number of blocks that need to be chained together in order to commit.

func (*SimpleHotStuff) CommitRule

func (hs *SimpleHotStuff) CommitRule(block *hotstuff.Block) *hotstuff.Block

CommitRule decides if an ancestor of the block can be committed, and returns the ancestor, otherwise returns nil.

func (*SimpleHotStuff) InitModule added in v0.5.0

func (hs *SimpleHotStuff) InitModule(mods *modules.Core)

InitModule initializes the module.

func (*SimpleHotStuff) VoteRule

func (hs *SimpleHotStuff) VoteRule(proposal hotstuff.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