Holochain Forum

What is Holochain's Consensus Algorithm?

Holochain doesn’t manage consensus, at least not in the sense of some absolute perspective on data or sequence of events. They manage distributed data integrity. Holochain does rely on consensus of validation rules (known as DNA), which define that integrity, but so does every blockchain or blockchain alternative (e.g., Bitcoin Core). If you have different validation rules, you’re not on the same chain. These validation rules establish the “data physics,” and applications are built on that foundation.

In making Holochain, our goal when providing data integrity for fully distributed applications is to keep it, “as simple as possible, but no simpler.” As we understand it, information integrity does not require consensus on an absolute order of events. We know this because it’s how the real world works —meaning, the non-computer, physically distributed systems. Atoms, molecules, cells, and bodies each successfully maintain the integrity of their individual and collective state without consensus on a global ledger.

Not only is there no consensus in Holochainon an absolute order of events, but if you understand the General Theory of Relativity, you’ll understand that there is, in fact, no “real” sequence of events—only sequences relative to a particular vantage point. Holochain is implemented in much the same way. Each source chain for each person/agent/participant in a Holochain preserves the immutable data integrity and order of events of that agent’s actions from their vantage point. As data is published from a source chain to the validating DHT, other agents sign their validation per the shared “physics” encoded into the DNA of that Holochain.

The minor exception is when a multi-party transaction is signed to each party’s chain. That is an act of consensus—but consensus on a very small scale just between the parties involved in the transaction. Each party signs the exact same transaction, with links to each of their previous chain entries. Luckily, it’s pretty easy to reach consensus between two or three parties. In fact, that is why they’re doing a transaction together in the first place—because they all agree to it.

Holochain does sign every change of data and timestamp (without a universal time synchronization solution). This provides an ample foundation for most applications that need solid data integrity for shared data in a fully-distributed, multi-agent system. There will surely be people who will build consensus algorithms on top of this foundation (e.g., rounds, witnesses, supermajorities of Swirlds).

However, if your system is designed around data having one absolute true state, not one that is dynamic and varies based on vantage point, we might suggest you rethink your design. So far, in every problematic space where people thought they would need an absolute sequence of events or global consensus, we have been able to map an alternate approach without those requirements. Also, as mentioned above, we already know the world outside of computers works without relying on an absolute true set of facts. Designing your system to require (or construct) an artificial reality is probably setting yourself up for failure, or at the very least, massive amounts of unnecessary computation, communication, and fragility.