Skip to content

Releases: edgedlt/hotstuff2

v0.1.1

10 Dec 11:54

Choose a tag to compare

A minor release with improvements for integrators.

Improvements

  • Observability hooks: New Hooks[H] struct with callbacks for consensus events (OnPropose, OnVote, OnQCFormed, OnCommit, OnViewChange, OnTimeout). Use NewHotStuff2WithHooks() for full observability support.
  • Read-only state access: New ConsensusState interface via hs.State() for monitoring dashboards (view, height, locked QC view, high QC view, committed count).
  • Message codec helper: New MessageCodec[H] for convenient message encoding/decoding in network implementations.
  • Structured error classes for simpler error handling:
    • ErrConfig - configuration errors (hard, fix and restart)
    • ErrInvalidMessage - malformed peer messages (soft, drop and continue)
    • ErrByzantine - potential Byzantine behavior (soft, log/penalize peer)
    • ErrInternal - invariant violations (hard, indicates bug)

Bug Fixes

  • Fixed single-node consensus (degenerate case) not forming QCs due to leader's implicit vote not triggering quorum check
  • Fixed BLS votes failing timestamp validation (BLS uses timestamp=0 for signature aggregation)
  • Fixed flaky integration test comparing blocks by array index instead of height
  • Fixed optimistic demo speed in web UI

Documentation

  • Added Observability section to integration guide (hooks, state monitoring)
  • Added Error Handling section with error class reference
  • Added State Management and Pruning guidance
  • Updated documentation links in TLA+ specification

v0.1.0

28 Nov 00:31

Choose a tag to compare

Initial release of a Go implementation of the HotStuff-2 Byzantine Fault Tolerant consensus protocol.

Made for personal use. Unaudited. Use at your own risk.

Features

  • Two-phase BFT consensus with optimistic responsiveness
  • Linear view-change with O(n) message complexity
  • Dual signature schemes: Ed25519 and BLS12-381
  • Configurable block time with adaptive pacemaker
  • Generic design supporting custom hash types and blocks
  • Interactive web demo with fault injection

Verification

  • TLA+ model checked: 12 safety invariants, 4 liveness properties (790K distinct states)
  • Twins framework for Byzantine fault injection testing
  • Comprehensive test suite with race detection

Documentation