How it Works

Individual Agency

A Holochain app is different from what you’re used to. It starts with individual agency — you run your own copy of the app, your identity and data live on your machine, and nothing happens without your consent. Each piece of data you create is signed with your unique key and stored in your personal journal.

Shared Rules

At the core of the app is a collection of rules that define what valid data looks like. Because each one of you has a copy, you can all hold each other accountable. The rules become a social contract. Bad actors get identified impartially, and news of their actions travels fast. Soon they find themselves on the outside of the group.

Mutual Sovereignty

Because every user of the app has the same powers and responsibilities, a balance is maintained between freedom and accountability. We call this mutual sovereignty. It’s what makes the app function securely, even though there’s no server in the middle to enforce the rules.

A Holochain App: Step-by-Step

Bob installs the core of application 1, called a DNA, into his Holochain runtime. The DNA contains functions for writing and accessing data, connecting with peers, and validating data.
On application startup, Holochain creates a source chain, a journal for all the data Bob's DNA will create. This journal is a ‘hash chain’, a cryptographically tamper-evident data structure. Each entry in the journal is signed by his private key.
At the beginning of the source chain is the fingerprint of the DNA; this shows that Bob’s computer has seen the rules and agrees to abide by them.
After the DNA fingerprint comes an optional membrane proof. For applications that restrict membership, this journal entry shows that Bob is allowed to join the network. It can be an invite code, proof of dues, or a vouch signed by an existing member — whatever the application needs to protect its users.
After the membrane proof comes Bob’s agent ID. This is the public complement of his private key, and it serves as both his unique identifier in the network and a means of verifying the signatures on his journal entries.
After writing these first three entries, Bob tries to join the application’s peer-to-peer network. He publishes his first three journal entries to the network’s distributed hash table (DHT); if his peers determine that they’re valid, they admit him into the network.
Bob’s peers in the network also have their own copy of the DNA with their own agent ID and source chain.
Bob starts using the application, writing application data to his source chain. Public data is shared to the DHT to be validated and stored, while private data stays on his device.
Bob and all his peers maintain their own DHT shard, containing copies of a small, random portion of all the public data that’s been published.
Bob’s DNAs can bridge to each other to share functionality and data. Each DNA has its own separate network, and access is controlled by a consent-based capability security system.
Start Developing with Holochain

Join the Conversation
Discord & Community Engagement

Visit Discord Site
It looks like you are using Internet Explorer. While the basic content is available, this is no longer a supported browser and some functions and styling may not work.