An implementation of the SWIRLDS HashGraph Consensus Algorithm as specified in the paper. This is a library that provides all the functions needed to reach consensus.
This code uses iterators to traverse commitments, and although it is a pretty abstraction, it can be slow. There is a re-implementation of the library using conventional graph search algorithms and matrix math here. Performance is improved dramatically.
Run the tests with cargo test
.
The algorithm is performed by algorithm::datastructure::Graph
structure. See its documentation & implementation for details.