Holochain: an agent-centric framework for distributed apps

I still claim that you can’t have a mutual credit currency without central coordinators to make sure double-spends don’t happen.

Yes it’s certainly a common confusion, but the difference is that Holochain is the framework, and Holo is just one app. It’s sort of like the difference between blockchain and Ethereum, except if Vitalik et al. had also invented the concept of blockchain in the first place :slight_smile:

Is your primary concern with sybil protection? Also I’m wondering how you are understanding what “mutual credit” is. I want to make sure we’re on the same page on that, because otherwise we might get confused.

Holo will indeed be relying on third-party KYC identity verification for hosts (who can create currency up to a credit limit determined by a demonstrated history of hosting services, as part of the elastic currency supply in the mutual credit design). Otherwise I’m curious what other kind of problem you could see with the validation model? If someone tried to double-spend, they would fork their own hash chain, which would be detected by peers in the validation process. A time delay of at most a couple minutes would be needed to ensure any previous transactions have been fully propogated in the DHT.

1 Like

Basically. I am deeply interested in reputation systems, and mutual credit (at least from my introduction to it in that article) seems to rely on reputation to function correctly. Not a bad system, but it’s fragile at scale as most human societies and the internet prove pretty sufficiently. I will definitely learn more about it, but there’s a reason why no major economy runs on mutual credit systems… we don’t trust each other when money is involved! (mostly because we do bad things to each other when profit is at stake)

2 Likes

I think you’ll enjoy the Holochain/Metacurrency rabbit hole. It’s quite a deep one!

2 Likes

Welcome to ethresear.ch! I do intend to look more into Holochain but need to prioritize getting a job, which may include working on an startup idea to incentivize waste reduction along with a part-time job.

3 Likes

AIUI, Holochain and its mutual credit currency can’t be used for any economic activity, unlike Ethereum and Ether. Indeed, https://holochain.org lists apps that it helps. From https://developer.holochain.org/guide/latest/faq.html#what-kind-of-projects-is-holochain-good-for: “Fiat currencies where tokens are thought to exist independent of accountability by agents are more challenging to implement on holochains.”


Edited section May 14:

I’d edit the top post with this but I can’t:

Holochain pros:

  • unlimited scalability
  • doesn’t enforce universal consensus when every use case can do without it. Mutual and reputational credit can be used for transactions rather than fiat cryptocurrencies or tokens. You should be able to implement a blockchain as a Holochain happ, but again, this isn’t necessary. Fiat currencies (including cryptocurrencies) have inherent centralization with the stakeholders controlling the currency, e.g. developers, miners, stakers, validators; although this could be mitigated with a DAO, but then governance of the DAO can be complicated and there hasn’t been a secure demonstration yet.
  • You can build a full (stack) happ on Holochain, rather than just a smart contract. This allows all of the code, state and data for the happ to be decentralized, rather than only hosting some code e.g. on GitHub servers, plus the developers, testers, and early-adopters who host it on their local machines. If there is a fork in a node in one line of code, that node gets rejected by validators and must fork to its own happ to continue operating independently, or sync with the existing happ.

Cons:

  • rather than using consensus, mutual and reputational credit, if used to transact, hinges on KYC. But perhaps using KYC isn’t such a bad thing, and you could potentially have a web-of-trust like mechanism (a la KILT) to decentralise the KYC and trust, and also enable the ability to revoke trust from any entity at any time. Additionally, if you don’t need to transact currencies, and just transfer data, then Holochain, Secure Scuttlebutt, and Dat Protocol are more suitable than blockchains, with Holochain having the above advantages. Not enforcing universal consensus is what enables unlimited scalability.

As quoted above:

I’m not going to create another account and get involved with another conversation. I would like to point out that I see a criticism about the centralized aspect of Holo that appears to show lack of understanding of Holochain. Unless I don’t have the full context of the conversation.
Yes Holo is partially centralized. They admit that. That is the cost of creating mass adoption. Until people evolve to using pure Holochain. Don’t like KYC, they only run Holochain and require all your users to install it.
Blockchainers live in this future where everyone wants to do anonymous transactions because they don’t trust the “powers that be.”
Holochainers live in a future where they care about the people they transact with.
—lifesmyth

Me:

AIUI, to do mutual credit with Holo is one way, requiring KYC. But AFAIK there is no decentralized, sybil-resistant approach that does not involve consensus or a blockchain approach, in order to avoid invalid transactions such as double-spending.

pauldaoust:

re:

But AFAIK there is no decentralized, sybil-resistant approach that does not involve consensus or a blockchain approach

I’d further qualify your list of adjectives by adding ‘anonymous’ – because there is one very good decentralised, Sybil-resistant approach that doesn’t require PoW/PoS/etc, and that’s KYC – or at least some sort of human identification approach that all the participants in the system are comfortable with, which may in fact permit pseudonymity if you design it right. Connecting accounts with humans, whether those humans reveal their IRL identities or not, is by definition Sybil-resistant.
I’d further qualify your list of adjectives by adding ‘anonymous’ – because there is one very good decentralised, Sybil-resistant approach that doesn’t require PoW/PoS/etc, and that’s KYC – or at least some sort of human identification approach that all the participants in the system are comfortable with, which may in fact permit pseudonymity if you design it right. Connecting accounts with humans, whether those humans reveal their IRL identities or not, is by definition Sybil-resistant.
It’s also useful to talk about the consequences of Sybil attacks for a given distributed system. For a global ledger, the consequence is of course that the Sybils can control what goes into the ledger. (Hence the very clever but wasteful remedy, proof of work.)
For a Holochain network, the risks are different. You’ll never get enough Sybils in a given neighbourhood to completely push out the possibility of one honest neighbour who blows the whistle on them all. They can choose not to talk to that neighbour, but they can’t force the rest of the network to do the same. As far as I can tell, the only thing that Sybils can do in a Holochain network are:

  • ‘ruin the party’ – that is, issue spurious warrants, fail to store or pass on data, etc, in order to make all the honest nodes work really hard to do the sort of data validation that should be done automatically.
  • mount an ‘eclipse attack’ – this is when an honest node is completely surrounded by dishonest peers.
    We’re thinking about both issues, of course.
    https://chat.holochain.org/appsup/pl/9j3izxtdfig8upq8quzqyeo1dc

There’s more discussion on Sybil attack resistance at https://chat.holochain.org/appsup/pl/nx56wg6amfgg8bmwj34pdhhwze (it goes over two days to Apr 16).

1 Like

Agreed, this is a major drawback that apparently makes it impractical for Holochain to integrate with the modern economy and scale. It is a very hard problem to proof against Sybil attacks in a reputation network and AFAIK no method has been proven to do so. I’m not sure about this, more research and thought is needed.

1 Like

Actually, it’s not the reputation of the people exchanging credit that matters, but the reputation of the notaries. Just a single notary acting in good faith can stop an invalid transaction from going through. A good reputation system or a very strong application membrane should be able to keep the majority of notaries signing any given transaction as an honest actor.

Even if there is an unreasonably high chance of choosing a dishonest notary by whichever metric the currency chooses (i.e. purely random or random but weighted by reputation) at 30%, it would still take less than 150 notaries per transaction to have a lower chance of accepting an invalid transaction than the chance of two 256-bit hashes colliding.

Here is my math:

b^n < 2^{-256}

Where b is the chance of picking a dishonest notary, n is the amount of notaries we are picking per transaction. (and 2^{-256} is the chance that some random 256-bit number is equal to some other random 256-bit number)

And even such a number as 10%, where only 78 notary entries are required for the same effect, may be a gross overestimation of the possibility of attacks, given that any effective reputation system would completely (or mostly) invalidate an agent’s reputation if they were to validate two competing notary entries (these entries are stored on a hashchain, keeping the chain linear would reveal the conflicting data, but splitting the chain is not allowed, and is protected by a very similar system to the one just described).

2 Likes

Here’s some thinking about Holochain mutual and reputational credit: https://medium.com/@james.ray/holochain-economics-671ef4a66974 with a brief comparison to alternatives.

Hi Alex,

Bruno França from Trinkler Software has these rebuttals to your comment:

Well, first he’s assuming that the notaries are chosen at random. That’s not a given… Second, if you continue that line of reasoning you’ll just reinvent PoS. Because you’ll then need a set of notaries that will validate all transactions, and then you’ll end up requiring some type of deposit from them to prove good faith.

Additionally, he also countered that reputational credit is prone to Sybil attacks (my additions are in brackets):

Mutual credit currencies are very susceptible to Sybil attacks.
They give a debit limit to everyone, including new accounts. That would mean that someone can create infinite accounts to get infinite credit. To solve that you need some way of tying a single account to a person, and that would ruin the anonimity of the blockchain. [Yes, it is true that Holochain doesn’t design for anonymity, although it states in the FAQs that it could be added on a layer 2 network, although there’s no detailed proposal for that.] Besides there’s no good system for decentralized identities so far.

Well, you can say that to create an account you need to provide some finite resource, like computational power or time. But then you are just doing proof-of-work, or proof-of-time, or proof-of-space, etc. [I.e., redesigning a consensus protocol.]

He also noted that Ethereum’s sharding approach appears to borrow inspiration from Holochain. I can see that where you have the central beacon chain (analogous to the DHT in Holochain) and the shards (which are somewhat analogous to agents’ individual chains in Holochain, although you can only go to 4096 shards before you would have to do quadratic sharding). Although if you can do 270k non-private or 27k private transactions theoretically with layer 2 rollup scaling with zk-proofs, quadratic sharding may never be needed.

Incidentally, he did comment that Eth 2’s sharding approach “just seems hacked together and inelegant. The holochain method of having one account = one shard is much more elegant.”

More dialogue between us:

Me: Problem is that a blockchain needs universal consensus, so it would be exceedingly difficult or seemingly infeasible to design one shard per account for a blockchain, unless you figure out a highly secure, feasible way of doing exponential sharding, or whatever.
Holochain doesn’t have the constraint of universal consensus, so one chain per account is possible.
Bruno: The only reason Holochain is not secure is because it lets the account owner choose the validators for its own account. If instead the validators were attributed randomly to each account, it would be safe.
Then you add some intra-shard communication, and you have a sharded consensus. But it would be kinda slow.
J: Yes, but attributing randomly in a decentralized way is not simple to do, hence things like PoW and PoS.
I.e., consensus on the randomness, and consensus on who is randomly assigned and what they submit.
B: Indeed, and that’s why I don’t have a paper on sharded consensus. :smiley:
J: Haha
Anyway, there is still plenty of merit to Katallassos’ approach of trying to integrate with cryptocurrencies, fiat currencies and other token-backed finance. [Bruno led the effort on designing and writing the Katallassos and Enso paper and works for Trinkler Software, as do I, starting just this Monday.]
B: Anyway, I think that we (the blockchain community) are still a few years away from having a sharded consensus algo that works well. Only now are we starting to reach the limits of what single-chain consensus can do.

Well, first he’s assuming that the notaries are chosen at random. That’s not a given

The notaries are chosen at random based on the similarity of their public key hashes to the hash of the data being shared.

They give a debit limit to everyone, including new accounts. That would mean that someone can create infinite accounts to get infinite credit.

Holo fuel does not give a credit limit to everyone. A credit limit is earned by proving a history of hosting services, essentially giving hosts the right to “pre-sell” their own hosting-backed fuel.

On the topic of Sybil: yes it’s true there’s no good decentralized solution for identity verification yet. Holo fuel will require KYC, at least for hosts and app providers.

1 Like

Okay, I skimmed this. I think we lose something when we brand everything as concentric to a given platform. Holo-* etc.

What the general form for this may be is Random Serial Dictatorship.

I won’t be able to address anything pertaining to mutual credit tonight.

1 Like

Thanks for the link. From the last sentence of that page:

When agents can have weak preferences, however, no procedure that extends RD (which includes RSD) satisfies both efficiency and strategyproofness.

I would say that they can have weak preferences, e.g. if a transaction is invalid then a validator will be more likely (assuming an honest majority) to reject a transaction, otherwise they will be more likely to accept it. So yeah, I must concede that I’m skeptical about the RSD approach (and Holochain’s) suitability for financial transactions. Besides, and again, if sub-quadratic sharded consensus with layer 2 zk-proofed ‘rollup’ scaling can do 270k non-private or 27k private TPS, that may well be enough for a long time.

My inquiry on this was from a year or so ago when trying to figure out the logic behind Verified Random Functions with regard to prospective validator rewards and incentives. Weak preferences here would refer to a model around economic agents and so is likely ill-posed for crypto-economic agents as is. I view it as a sort of round robin…

Without wishing to derail any conversation here, perhaps there would be interest in a study group for the text on Algorithmic Game Theory? I find much of this research fascinating but without having tested and discussed with the ETH research community, it seems underutilized. Economic agents and software actors often seem to be conflated in my opinion, to say nothing of the prospect for an intelligent agent as well.

When agents can have weak preferences, however, no procedure that extends RD (which includes RSD) satisfies both efficiency and strategyproofness.

So yeah, I must concede that I’m skeptical about the RSD approach (and Holochain’s) suitability for financial transactions.

Weak preferences here would refer to a model around economic agents and so is likely ill-posed for crypto-economic agents as is.

Nevertheless and OTOH, inefficiency (up to an O(n^2) complexity) may be a necessary compromise in order to use a mutual credit cryptocurrency (rather than a fiat blockchain one), in order to gain more decentralization, with associated benefits of less inequality. After all, if we take a biomimicry approach, nature is often pretty inefficient, but adequate, cf photosynthesis.

Looks like an interesting book! I read up to the beginning of part one. I’ve added it to Pocket.

Just a follow up from Bruno:

@jamesray1, a small correction. I led the effort on designing Albatross and Enso (not katallassos and enso), Katallassos was led by Reto. Credit where credit is due.
Regarding the comment from ethresearch you sent me, this is my answer:
That can be biased easily. The account owner controls the data that is in each transaction, so he can just try different combinations of it (by changing a nonce or a signature for example) until he gets a set of notaries that he likes. If I control let’s say 0.1% of all notaries and I have an account, I can create a transaction, slightly modify it until it gives a set of notaries that I control and send it. So I can effectively double-spend with a very small percentage of the notaries. Anyway, you’ll just say that this is not feasible because notaries need to pass KYC so I’ll concede to you. But that brings me to my second point.

“Holo fuel does not give a credit limit to everyone. A credit limit is earned by proving a history of hosting services, essentially giving hosts the right to “pre-sell” their own hosting-backed fuel. On the topic of Sybil: yes it’s true there’s no good decentralized solution for identity verification yet. Holo fuel will require KYC, at least for hosts and app providers.”

That’s a bit misleading. Hosts and app providers, are in a mutual credit system and need to pass KYC. Users, who do not need to pass KYC, have no credit and effectively don’t exist in a mutual credit system. So, the way that Holo solves the problem of new accounts creating money is by introducing KYC.
That is my main objection to this Holo system, it requires a central entity doing KYC and deciding who gets to be a host, or a notary or a app provider.
This is completely unacceptable in a blockchain. It is no longer open, because the central entity decides who gets in. So, Holo in practice is a permissioned blockchain. It is also no longer anonymous because people need to pass KYC and it is no longer censorship resistant because the central entity can expel hosts from the network.
Just imagine if tomorrow Vitalik came out and said: “Folks, we are going to start requiring that miners and dApp creators pass a KYC test with the Ethereum foundation”. The community would be outraged, it is completely against everything that a blockchain is supposed to be.
Look, I love Holochain, it is a very smart concept, like IPFS. But the Holo currency is a hack job. They realized that Holochain can’t support a token so they decided to do a mutual credit system on top and when they realized that mutual credit requires a defense against Sybil they just added KYC verification. It’s just bad and lazy designing.

I spent a few months trying to elevate the mathematics behind Holochain and made some serious progress, but I’ve set it aside for now while I finish my dissertation. You can read some of my thoughts here on describing Holochains with sheaf theory, which is highly suited for agent-centric distributed systems in general and not necessarily Holochain specific: https://medium.com/the-advancedness-project/holochain-white-paper-and-the-road-to-sheafhood-9d5b159ee074 The work of David Spivak and Robert Ghrist and their collaborators on the use of sheaf-theoretic methods for multi-agent systems lends a lot of credence to this idea.

I think a sheaf-theoretic framework in general is the right way to both global consensus mechanisms a la blockchain, and local consensus of the sort Holochain does in a unified framework. Last year at the Second Statebox Summit https://summit.statebox.org/#/ we made a lot of progress doing this. I’m not sure where that project is at at the moment. I’m at least at the point where I can described distributed hash tables using sheaves (though I don’t have a paper to show you yet unfortunately, just notes - I’d like to write the paper after finishing my thesis). I think Holochain should be a natural extension of this formalism due to the compositionality properties of category theory, as could other potential distributed app platforms built on top of distributed hash tables.


One important aspect of the Holochain consensus mechanism that hasn’t been mentioned yet is that Holochains are capable of reaching global consensus by asking every node to be a notary for every transaction. The lead Holochain programmer, Nicolas Luck, was working on implementing Nakamoto consensus in an early version of Holochain. He has been swept up by trying to finish the software, but it generally confident that it can be done. This would work as a sign that Holochains may be a direct generalization of a blockchain, and the sheaf-theoretic formalism I was working on could act as a proof. Of course, if you wanted to do global consensus, a blockchain would obviously be the better tool for it.

This makes sense from the point of view of the sharding discussion above. I’ve frequently thought of Holochains as the limit of a sharded blockchain where the number of shards equals the number of nodes.

4 Likes

Thanks for your insights! I also read your Medium article and did associated reading of the Monty Hall problem and Petri nets.

Yes I agree that it seems like a blockchain (or multichain like Polkadot or Cosmos) can be implemented on Holochain, thus that the latter seems more abstract, and that Holochain extends to the limit sharded consensus, and which would allow for greater interoperability between them, and suggests that Holochain or an agent-centric distributed system would be more useful. Substrate may also be used to build a blockchain on Holochain.

Yes I forgot to mention that, thanks:

I want to add comments from a separate channel at https://chat.holochain.org/appsup/channels/holo-currency-qa:

I’m not going to create another account and get involved with another conversation. I would like to point out that I see a criticism about the centralized aspect of Holo that appears to show lack of understanding of Holochain. Unless I don’t have the full context of the conversation.
Yes Holo is partially centralized. They admit that. That is the cost of creating mass adoption. Until people evolve to using pure Holochain. Don’t like KYC, they only run Holochain and require all your users to install it.
Blockchainers live in this future where everyone wants to do anonymous transactions because they don’t trust the “powers that be.”
Holochainers live in a future where they care about the people they transact with.
—lifesmyth

Me:

AIUI, to do mutual credit with Holo is one way, requiring KYC. But AFAIK there is no decentralized, sybil-resistant approach that does not involve consensus or a blockchain approach, in order to avoid invalid transactions such as double-spending.

pauldaoust:

re:

But AFAIK there is no decentralized, sybil-resistant approach that does not involve consensus or a blockchain approach

I’d further qualify your list of adjectives by adding ‘anonymous’ – because there is one very good decentralised, Sybil-resistant approach that doesn’t require PoW/PoS/etc, and that’s KYC – or at least some sort of human identification approach that all the participants in the system are comfortable with, which may in fact permit pseudonymity if you design it right. Connecting accounts with humans, whether those humans reveal their IRL identities or not, is by definition Sybil-resistant.
I’d further qualify your list of adjectives by adding ‘anonymous’ – because there is one very good decentralised, Sybil-resistant approach that doesn’t require PoW/PoS/etc, and that’s KYC – or at least some sort of human identification approach that all the participants in the system are comfortable with, which may in fact permit pseudonymity if you design it right. Connecting accounts with humans, whether those humans reveal their IRL identities or not, is by definition Sybil-resistant.
It’s also useful to talk about the consequences of Sybil attacks for a given distributed system. For a global ledger, the consequence is of course that the Sybils can control what goes into the ledger. (Hence the very clever but wasteful remedy, proof of work.)
For a Holochain network, the risks are different. You’ll never get enough Sybils in a given neighbourhood to completely push out the possibility of one honest neighbour who blows the whistle on them all. They can choose not to talk to that neighbour, but they can’t force the rest of the network to do the same. As far as I can tell, the only thing that Sybils can do in a Holochain network are:

  • ‘ruin the party’ – that is, issue spurious warrants, fail to store or pass on data, etc, in order to make all the honest nodes work really hard to do the sort of data validation that should be done automatically.
  • mount an ‘eclipse attack’ – this is when an honest node is completely surrounded by dishonest peers.
    We’re thinking about both issues, of course.

Sheaf theory and algebraic topology aside, I am pretty unconvinced this level of mathematics has come up strongly in this space esp under any multi-agent setting where it is surely only obscurantist. Category theory could inform patterns at a higher level than merkle trees, inducing algebraic properties thereof, the gold standard in agent systems would be toward unbounded nondeterminism.

Composition of agents in blockchain, that is through balancing offchain and onchain interactions concurrently, will need quite a bit of work to be adapted fruitfully. Even all of the code that Polkadot has is rather basic from a mathematical standpoint. That won’t be the problem here, really. We actually have to be careful not to be obscurantist with respect to the work that needs to be done to bring forward any crypto-economy. Where are the dApp developers? It really isn’t about giving them a good API even, this otherwise is purely intellectual masturbation.

1 Like

Of course any new idea that is still not even publication-ready is obscure. You are trying to chop down an idea before it has even grown to maturity. With that anti-intellectual attitude, nothing new would ever be discovered. If you have a better idea on a uniform way to discuss many types of consensus algorithms under one roof, I am all ears.

1 Like