Holochain: an agent-centric framework for distributed apps

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

Not trying to cut down or be anti-intellectual, that would be quite ironic if that was the case.

There has been a systematic retreat from the exchange value of any crypto-currency. That is worrying to me, flies in the face of any theory to build an actual robust economy, which I believe is the vision of any cryptocurrency. There are costs for transforming technology into products, and it unfortunately is unlikely to be developed singularly by individuals over the web. The modern financial system is very complex.

To think beyond that requires the willingness to go deeper into theory that does not directly pertain to code, ie research. It should perturb people that dApp developers are often uncompensated, expected to make relationship-specific investments of uncertain end, in a way that often gives way to the same type of centralization of knowledge and insight that drove Facebook to where it is today. It is worrying. There are many people that engage via altruism, that is the ethos of open source, but there comes a time when that is exploitative. I am worried that cryptocurrency is heading there.

I am also all ears to any innovation that can be widely market ready. Unfortunately, as the large set of code and ecosystems have shown us, there is someone always getting left out, and that tends to be the innovators. I am not the first that has expressed this concern, it’s woven to the fabric of any of these projects. Regardless, let’s not deviate from the thrust of this conversation here, right?

2 Likes

Fully agree with this, I’ve experienced this first-hand with Ethereum 2.0 development, being involved with Ethereum for around 2 years without adequate remuneration! I’ve also been asked to volunteer for Holochain writing developer documentation.

1 Like

Always seems highly incongruous that any system proposing to challenge much of anything is built on a system of volunteers. Even Communism was better than this: “to each according to his ability”. The issue becomes that cryptocurrency appears to be a late capitalist expression that systematically derives market value from individuals that are disenfranchised and alienated. I’ve seen it performed systematically and it disgusts me.

The vision behind many of these platforms is thin at best and were it not for the contributors, they would have gotten nowhere. People need to demand not only just compensation, but a removal of this form of servitude. Reasonable firms vest you with the upside prospect of the company, and even then they are quite unsure. It seems at times cryptocurrency has brought out the absolute worst of human nature.

Then again, when I was going to launch my stablecoin, widely told I am sitting on absolute gold, I was hard-knuckling it: trying to only have VCs buy 1% of the token distribution. I consider it an inverse of “Occupy Wall Street”. Multiple major projects over the past year have raised and then implied partnerships and incentivizing firms over the longer term, when in reality it is mostly false and fraudulent advertising, they take your hard work and it becomes a process of recentralization, especially when you unexpectedly begin to challenge a core value proposition, often cryptographic competency and the “build-on-us” mentality. It seems at the highest levels there is little room for alturism, which is unfortunate given the incompetency of investing this space has shown.

Creates natural frictions and coordination issues, that will fray rather than build many communities, and compromise their ability to source talented and motivated people without feeling fundamentally threatened. The market value for any of these skills is inherent, and we need the smartest people we can find. If cryptocurrency wants to be the revolution it proposes, these are among the first challenges that must be remediated or the entire system will come to be seen as charlatans with far worse corporate behavior than any Investment Bank would ever have dared to dream of.

Related: Arrow Information Paradox

1 Like

So does this mean I need to build my reputation and let it rip?

Getting buy-in on a community is very vague. I have changed multiple organizations since my engagement in the cryptocurrency space, was behind some of the core ideas that brought it forward.

Some of the key figures in cryptocurrency went into deep research periods upon my own ardency. All I heard was “I think they are hiring cryptographers” and I was off and running. Few optimistic emails later, and an entire corporate structure changes, everyone is recalled to home base, and now it has been several.

Largest issue is that cryptocurrency as any of the projects can attest to wears blinders. Talent is one thing, certainly. Most people should have a role, I view cryptocurrency as a sort of catch-all for individuals that could not work at other highly prestigious organizations. Except they often can, but perhaps alturism and a sense of the social good guides them deeply, and cryptocurrency takes that stance. I can point to multiple times when I have influenced the entire cryptocurrency space in the past year, and I am tired of being the Howard Roark of it, community is less than admirable.

Let’s see what Consensys says. Thankfully cryptography is only the most recently learned of my skills, well aside from more now recently still, justifiable conclusion of auction theory: Adtech.

Idealism only takes you so far in life, ultimately. It is rather unfortunate, because if I flip, I will make sure that cryptocurrency is rendered inert fully. You guys should take the mandate and perform acts of actual leadership to positive social value. When an entire sector is consumed with the very mediatization and propagandizing, financed by selling conference tickets, one has to wonder, as that must end for any vision of cryptocurrency to be unfolded. This is all I sought to fight. Rather than Occupying Wall Street, what needed to Occupied was the Media.

This is not germane here, but it must be said, and where else am I going to say it. It is phenomenal how integral and how much of my vision and DNA is in Ethereum. It’s been a long year and a half since finding it boyishly amusing, however.

My first focus was on communities: Meshes. People use this now as an operative term, you see it even at JPM “a mesh of blockchains”. I may be too far in the future, but yea Holochain. RTFM and STFU right? Unfortunately you cannot have social missions without addressing social challenges or you end up with myopic echo chambers.

But James, we should probably do more uncompensated research. I have solutions but I am fed up.

Irony is that you talk to any dApp developer: and I know how to create DAOs. That was the only thing that got me into this space, so I spent the time reading then quite a bit of law. I can achieve the highest visions in this space, and yet I cannot even eat from the effort that I have put into ETH. I truly am beginning to lack the ability to see the vision. It is a travesty that will go down in history similar to how Marx lived his life after being denied what would have been a small increase in an expense account. Sometimes, you have to earn people’s loyalty and it is the other way around.

Seriously, you guys seem the smartest people in this space, so I thought I would share my experience and thoughts, but I do not intend to hijack what discussion is here re Holochain. Unable to find a fishing line emoji. That, gentlemen, would be reeling it in.

2 Likes

Like I said I agree that funding in the crypto space, as well as FOSS, leaves much to be desired, with much work being self-funded or voluntary, at least initially in order to get a foot in the door in the sector.

I don’t know much about what you’ve done. I think that humility, positive and persevering attitude in spite of trialing circumstances, and getting along with others is important for any situation.

In my case I simply can’t afford to do more voluntary work, and am applying for jobs. Part-time jobs are rarer than full-time jobs, particularly with professional jobs. After being knocked back for a gossipsub grant, being told “we value your efforts and encourage you to continue contributing as a passion project”, I’ve been applying. I was hurt by this, if efforts are valued, why can’t the EF provide even a modest stipend to support work, then when results are achieved or progress is made competitive compensation can be given?

Ending on a positive note, I have a job application in progress with Pacio and Tender development, hopefully I’ll have good news to share soon. Another job application is with developing an energy happ on Holochain with Noosa Power. Plus looking within the crypto sector, renewable energy engineering and elsewhere, even a nightfill job at a supermarket! At least if I have a part-time or casual job I’ll be in a more secure position and more willing to contribute pro-bono to interesting projects, or skill up e.g. with learning frontend dev frameworks (I already know HTML/CSS and JavaScript), and keep applying for more jobs.

1 Like

I’ve moved the contents of this comment higher up in the thread to the first comment that I could edit:

1 Like

I apologize for the long lag in my replies. I’m in the last few weeks of writing my dissertation so that is taking all of my time, and I woke up in the middle of the night now and started thinking about this so I’m writing this hoping to lull myself back to sleep.

One directly developer-relevant reason to pursue sheaf- and category- related formalisms for blockchain-related technologies is the ability to compile Statebox code to it. Statebox is a completely unique programming language based on the formalism of composable open Petri nets, which they have shown in their monograph are presentations of free symmetric monoidal categories. Free symmetric monoidal categories are in a sense (also shown in their monograph) universal for distributed computing protocols. A smart contract written using Statebox ought to be able to compile to any distributed computing system that has a good categorical description. This means we will be able to write programs once and compile them to any blockchain-type system (including also Holochain I believe, but this remains to be shown), eliminating the need to write the same smart contracts over and over. Statebox is also perfectly capable of describing distributed quantum computing in the same language and distributed digital computing, so it is perfect for these uses as well.

Another advantage of this is that category theory is the realm in which hybrid digital/quantum computation is most easily described. Quantum computing as well as the quantum internet will inevitably end up clashing and merging with distributed computing platforms. The platforms where this will be most smoothly will be ones with categorical descriptions. Most people I know who think about quantum computing + blockchain related things are incredibly short sighted, only seeing the connection with cryptography, but that is only a tiny fraction of what is actually possible and what I predict will happen. The systems which are ready to take advantage of this by living in categorical foundations will be the ones most desired by quantum computer scientists, accelerating the development of a hybrid digital/quantum/decentralized internet. I wrote a general article about the possibilities of a decentralization and the quantum internet here: https://medium.com/the-advancedness-project/quantum-decentralized-e62600571be8 which describes this in more detail, as well as a more detailed specific use case here on trading quantum resources such as magic states using Holochain: https://medium.com/the-advancedness-project/trading-quantum-resources-on-holochain-ce59ffc3450

More generally, I just believe in the utility of sheaf-theoretic foundations due to the transformational power they had on mathematics when wielded by Grothendieck. It is impossible to predict what it could lead to, but I would hazard to guess it would lead to completely new types of decentralized systems that nobody has yet conceived of - infinite varieties of blockchain-adjacent systems that can be specialized to any number of purposes. This is general effect sheaf theory had on algebraic geometry, and ultimately category theory as well.

One final comment since I probably won’t comment again for several weeks but I hope you are interested enough to read more but I’m not available to answer questions: you can learn a lot more about this stuff by hanging out in the Statebox telegram, and following the people working on Statebox on Twitter.

2 Likes

I would like to add my 2 wei and just say that it’s hard to build a cryptocurrency, but if it will do anything, it should be able to enable secure and scalable payments. Holochain is scalable, but perhaps its security needs to be proven. Ethereum 1.0 is secure, but is in dire need of scalability. Hopefully Ethereum 2.0 can provide it. I will actually try to post about our project, https://intercoin.org from an architecture and design decision perspective and hopefully it will be interesting to some people here. The key point there is that security has a lot to do with economic incentives, and not just technology.