Crate hashgraph_like_consensus

Crate hashgraph_like_consensus 

Source
Expand description

A lightweight consensus library for making binary decisions in P2P networks.

This library implements the Hashgraph-like Consensus Protocol, which lets groups of peers vote on proposals and reach agreement even when some peers are unreliable or malicious. It’s designed to be fast (O(log n) rounds), secure (Byzantine fault tolerant), and easy to embed in your application.

§How it works

When someone wants to make a decision, they create a proposal. Other peers vote yes or no, and each vote includes cryptographic signatures and links to previous votes (creating a hashgraph). Once enough votes are collected, the proposal reaches consensus and everyone knows the result.

The main entry point is service::ConsensusService, which handles creating proposals, processing votes, and managing timeouts. You can use the default in-memory storage or plug in your own storage backend.

Modules§

error
events
protos
scope
scope_config
service
service_consensus
service_stats
session
storage
types
utils