Erlang implementation of HoneyBadgerBFT
Erlang implementation of HoneyBadgerBFT's protocols.
The HoneyBadgerBFT paper defines 5 protocols:
The protocols are implemented in a somewhat unconventional way, they are implemented as pure data structures that take inputs (messages) and (sometimes) return outputs or results. They have no notion themselves of networking, time or actor identity (actors are simply numbered 0..N-1).
External code is expected to provide networking, serialization and a mapping from real actor identity (eg PKI public keys and signatures or IP addresses, whatever) to a consistent index into the consensus group.
The sub protocols are embedded in their parent protocols and their messages get 'wrapped' by their containing protocols (and un-wrapped upon ingest). This makes testing them individually and composing them very easy.
$ make
$ make test
$ make typecheck
$ make cover