Skip to content

v0.1.1

Latest

Choose a tag to compare

@edgedlt edgedlt released this 10 Dec 11:54

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