Breaking the Chain

So I’ve decided that I’m going to ramble a bit about blockchain: what it is, what it is not, and some of the technical and socioeconomic problems that have emerged from its widespread hype. Before I begin here, I want to be quite clear: I royally detest what I’m dubbing “cryptovangelists” — finance bros with hard-on for cryptocurrencies that take it to the point to where it might as well be a religion of sorts. Actually, you know what? This is my damn blog and I’m going to give you a tangent in the introduction paragraph, so sue me assholes!

I went to San Francisco several years ago when the EOS.IO blockchain framework was in its (short-lived) heyday. Or, at least I seem to recall it being San Francisco—my memory is dogshit these days. Now, to be entirely fair to EOS.IO (or, Antelope as I suppose the continuation is called nowadays), the technology stack at the time was fairly robust to the degree that I wish other blockchain communities had taken some inspiration. And maybe I’ll touch on that in some other post, but not today—today, I’m focusing on blockchain at large. Anyhow, one of the little sessions I went to had Frank Chester as a speaker. Presumably this was because the logo associated with EOS tokens at the time was what is colloquially known as a “Chestahedron”—named after this guy. And lemme tell you, that talk was one strong fart away from being blown sideways into a full-blown recruitment session that any cult would be proud of. Lots of sacred geometry shenaniganery and something about the shape being a so-called accurate representation of the human heart, whatever. It was the same sort of feeling a naturalist gets walking into a megachurch and I, quite frankly, was not a happy camper. So you’ll notice here when I’m talking about blockchain technologies, I sit squarely between states of irritation and sheer boredom when the conversation concerns anything other than cutting-edge technologies that ultimately benefit humanity. As I’ll touch on here, blockchain tech has so much potential that is often utterly wasted in the pursuit of growing the wealth of men who literally lack the foresight to use their existing hoards for any good or novel purpose whatsoever.

Super Speedy Crash Course

This is blockchain. But how is it made?

A blockchain is fundamentally a data structure, a glorified extension of a linked list. Each node in the list is referred to as a block and the entire collection of blocks is referred to as the blockchain. You’ll often hear blockchains referred to as a ledger technologies, as it can be useful to use a bank ledger as an analogy when describing some of the use cases. This is because, in practice, each block can be thought of as a batch of transactions, each ultimately representing modifications to the current state of the “bank” represented by the blockchain at large. When the bank has new transactions by which the state ought to be modified, those transactions are bundled into a new block which is then appended to the blockchain. (Though this is a little misleading—as the blockchain itself can in a sense be seen as a literal timeline, often blocks are added periodically as opposed to as-needed, so it is possible to have “empty blocks”—but this is merely a minor detail, please carry on.)

Up until this point, we haven’t really talked about the primary difference between a blockchain and a linked list. That difference is that the contents of each block are hashed, and that hash is then stored as metadata in the next block. This provides a mechanism for verifying that a particular chain is unbroken—that is, that no block in a chain has been modified, added, or removed.

And outside of the aforementioned qualities, the mechanisms that enable other protections or features of the blockchain data structure can vary between blockchain implementations, although some mechanisms are more popular than others. For example, one method by which transactions are bundled and hashed such that their respective blocks only have one overarching hash (to be stuck in the following block) is to use what’s called a binary hash tree—or a Merkel tree—wherein the leaves individually contain a datum associated with one of the transactions to be included in the block, and the hash of that datum. (So, if you’re following along, and if I’m adequately explaining things, the Merkel tree ends up having a number of leaves no fewer than the number of transactions in the block.) And then, the parent node of each pair of leaves is the hash of the concatenation of the hashes included in its children. In cases where a parent node has only one child, that child’s hash is concatenated with itself instead. This continues up the tree until the a single hash can be used to verify the entire Merkel tree.

Now, in addition to a data structure that is difficult to modify (also known as a partially “immutable” architecture), there has to be a mechanism that guarantees that the blockchain isn’t being entirely rewritten. Think about it a second—we’ve talked about how we can ensure that data isn’t injected into or removed from a blockchain instance, but we have not talked at all about how we can prevent the entire database from being rewritten. Blockchain implementations take care of this seemingly-glaring loophole by requiring multiple machines—presumably owned by different actors, but this is more of a philosophical distinction—to synchronize the same database, the same blockchain, and to ensure that the other machines in the network aren’t misrepresenting that database. If you have two machines with a blockchain record stating that Alice paid Bob US$10, and a third machine with a record stating that in fact, Alice paid Bob US$20, then chances are that third machine has a forged record that doesn’t represent the collectively-known truth. The mechanism by which new blocks are generated and added to the chain, and the mechanism by which that new block is copied to all machines in the network, is called the consensus algorithm. Much of what you’ll find in blockchain-related discourse as it pertains to ethical concerns will regard the consensus algorithm itself—some consensus algorithms require a lot of operational power, for example, and many folks think that this is wasteful. While I tend to agree, I think that that particular horse has been beaten to death in literature and so I’ll skip that one for now (though I might come back to rant about it later). I’ll instead be talking about other sociotechnical concerns in blockchain.

But, the two most well-known consensus algorithms you’ll hear about are Proof of Work (PoW), which was a concept originally designed to prevent spam by having machines prove that they had conducted a certain amount of work (and therefore expended a certain number of operational resources) in order to send messages—thereby theoretically limiting the number of messages that could be sent in a short period of time, and Proof of Stake (PoS), which selects “validators” (actors charged with mandating the consistency of the blockchain and blockchain state) based on the amount of virtual coinage that they put into the system (which can be lost or burnt in the event that that validator turns out to be a bad actor, thereby incentivizing actions made in good faith). Both of these algorithms are used to prevent spam and ensure that the blockchain remains consistent across all participants in the network as new blocks are added to the chain.

Okay, good. Now, the above is the underlying concept of the blockchain—notably, the blockchain database and its accompanying consensus algorithm. But then, you generally need some sort of application layer on top of the data structure and consensus layer so that the chain can actually do something. Like, you presumably have a computer sitting in front of you (whether it’s in a mobile or desktop or laptop form factor), complete with persistent storage and RAM and a CPU, but none of that is going to get you shit without the operating system and userland software, whatever that might be. Old blockchains kinda had the OS baked in as “distributed firmware” of sorts, but most blockchains nowadays allow for what are called smart contracts (which are analogous to userland programs, except these run on a blockchain network instead of as an element of your machine’s operating system). Many of them are Turing-complete, which is neato. And then if you write one or more smart contracts, and you build an interface around it for standard users to, well, use, suddenly you have what’s creatively called a “distributed app” — or, if you’re one of the cool kids, a “dApp”. Point is, these smart contracts essentially live on the chain and are in and of themselves committed, uploaded, and/or interacted with though those very transactions we were speaking of earlier. And that’s no more strange than saying “a bank can save a ledger in a file, or it can save a computer program in a file”—everything is a datum at the end of the day, so why should distributed operating systems i.e. most blockchain implementations be any different?

Skrrrrrt!

“Hey that sounds neat, let’s use it for everything!” Well, hold up there, kid. We here at this fine establishment believe in using the most appropriate tool for the job, and not making the job work around someone’s favorite tool. If you’ve got a hard-on for Python and that’s all you ever do… guess what, you’re probably just a skript kiddie, don’t go pretending you know shit about software engineering. And if your idea of database work is strictly FileMaker Pro, you’re not really a well-rounded DBA, you’re just an FM SME. If you’re brown-nosing blockchain left and right without regard to its appropriate uses, then you’re just a cryptovangelist—don’t let the door hit ya on the way out.

Blockchain is useful when:

  • You cannot trust the providers of a particular type of service.
  • You’re willing to pay for storage space, and you’re willing to buy hard disks ad infinitum.
  • Speed is not all that important to you.
  • High availability important.
  • Global collaboration on infrastructure is feasible and necessary.

So there are a couple of directions I want to go here. The first one being, that list that I wrote out above? Everyone’s trying to make a chain with exceptions. But those exceptions pose their own problems.

  • Some chains have what’s called “delegated proof stake” (or similar) consensus algorithms where instead of putting your trust in all nodes as validators in accordance with PoS, you’re just working with the other stakers on the chain to select a small number of actors to run the chain. So this is good for quick decisions and/or upgrades that need to be made, but this certainly makes the chain quite a bit more centralized. Given that decentralization is probably most important factor for choosing a blockchain system in the first place, this choice could render your priorities moot.
  • Some chains get rid of their blockchain histories and operate what are called “pruned nodes”—essentially pulling a “just trust me bro” move on folks using the chain, as the full history of the blockchain cannot truly be verified. At this point, what’s the point of having something on the blockchain at all?
  • Some chain communities do what they can to make the progression of the blockchain move as quickly as possible. Some chains are okay at this—others are so awful that they require the nodes in the network to be incredibly close to each other physically. Suddenly, the network is geographically centralized once more—and again I ask, what is the point of blockchain tech when you’ve nerfed your resilience and decentralization like that?
  • High availability is kind of a funny thing in blockchain… you can claim your blockchain infrastructure is highly available all you want, but it only applies to standard infrastructure (servers, network equipment, etc). As the entire blockchain network contributes to a single shared blockchain state, the state machine manifested by the blockchain daemon and system contracts is not entirely redundant and failures at the system contract level will kill a chain globally… so you can’t even rely on blockchain technologies to be fully redundant in all cases. Don’t believe me? Take a look at any coordinated upgrade that goes badly.

And those are tech considerations, but honestly those pale in comparison to issues that I’m seeing in the space independent of the technology itself.

Sociotechnical Shenaniganery

I’m really not actually sure if “sociotechnical” is the best term here but I’m gonna roll with it. Now, some of the things that you seen in varous blockchain communities are not exclusive to those communities. When I was in college it seemed that just about every business major with a “great idea” would make a beeline to the computer science department to go find an unwitting nerd to develop an app. You know the sort of conversation… “oh yeah, can’t afford to pay you but you’ll make BANK if we get users”—sound familiar? This sort of thing extends to shady companies and, obviously, shitty blockchain groups. It is very easy for folks to get roped into these silly little “shared profit” pieces, where technical folks are convinced to work for very little but are essentially prohibited from leaving the company, else they’ll lose their early investment of time. If company founders are not willing to pay you up front for your time, the company is not worth the hassle.

Anyhow, this sort of sociopathic thinking is rampant across blockchain communities. Acutally, what’s really funny, and I’m sure it’s just a coincidence (hopefully, or else I’m even more concerned about the medical field than I already am), but the number of surgeons with a god complex that I know that just could not figure out what to do with their buckets of cash, and so they put it all into crypto, only to turn around and look for free interns to do tech work… that number is way higher than it should be.

Death Spirals

Hey so I’m going to section off this particular problem, one I’m calling the “blockchain developers’ death spiral”—and this is basically that the amount of software being generated is inversely proportional to the innovation present in a community. I sat some clients down to smack them upside the head when they were going down this rabbit hole, so it’s a little fresh on my mind. These death spirals happen when a blockchain community tries to “horizontally scale” and ends up with a bunch of code forks that effectively use the same upstream codebase to deliver a certain flavor of blockchain experience to a userbase. So this has happened to the Antelope folks, this has happened to some degree with the Substrate folks, the COSMOS folks are going through this right now, and there are many other groups that are affected by this. There are basically four different stages that these “ecosystems” go through.

Stage 1: Hype-Up and Forking

Okay, so this stage basically happens once, unless an ecosystem has some sort of large reboot or whatnot. This is the stage that ecosystems end up in when they’re first developed and being tested, and when the reference implementation is first released. There are a lot of bugs here. Everyone and their dog wants to start their own project. The reference implementation may support its own flavor of alt coins specifically for projects who want to build a dApp without pulling together their own validators—they’ll get ignored and people will shit out their own chain communities anyhow. Validator organizations will insist that they only need to validate in order to be profitable, no matter how often their analysts yell at them to “be better at business.” This is where the hype really starts building, and generally happens before the ICO.

Stage 2: Internal Tooling

Next up is the stage at which the only tools that are being built are the internal tools. So, snapshot websites, block explorers, metrics dashboards, alerting tools, etc. Most of these tools will be built by validator organizations who want to get their names out there so that they get delegations (in the event of a dPoS or similar chain). You’ll notice that this tooling is only being built to solve a problem that the same people building the tools are responsible for creating in the first place, so there’s a net 0 amount of innovation going on here. This phase kind of dies out when every tool under the sun has been made for the ecosystem.

Stage 3: DeFi Regurgitation

After internal tooling has been developed, you’ll have the “big brains” in the ecosystem start chattering about Web3 stuff and DeFi. So you’ll start to see silly little gambling dApps being developed, you’ll start to see IBC stuff. People will be like “oh wow this stuff is so innovative” even though we’ve basically seen a flavor of whatever’s being offered nearly a decade ago. People will go nuts for some reason over the newest DEX but everyone will secretly go to the CEX they’ve been going to for years anyhow. No new innovation will be truly done, other than maybe for the one use case that for some reason made the community consider the chain as something anything other than a vanity chain.

Stage 4: Heat Death

Lastly, something happens, it can be external like a stock market crash or it can be internal like a stablecoin depeg or something silly. And then it seems like everyone snaps out of their lust for whatever chain or community they were simping for, and the price crashes. Then those same people either burn out or they jump ship to the next token and they start the cycle over again. The ecosystems that do survive are drastically reduced in size… you can expect an ecosystem of twenty chains to drop to maybe four or five chains, and they’ll be the forks that were there since the beginning. At this point, any chain that forks from the reference implementation is a known scam.

Okay, everyone say it with me: Death. Spirals. Are. Not. Good. For. The. Advancement. Of. Human. Society. If you’re building a product, and the only thing that product does is create problems to be solved, then the net innovation is zero—sticking your head in a bucket of water will do the planet more good.

Boredom

Honestly, I thought I was going to continue to complain about the state of blockchain communities for a little while longer. I mean, there have been some really cool projects out there that may have served humanity had they had had the funding to continue. I once saw a project for a sort of “proof of location” consensus algorithm, where you could literally drop augmented reality tokens in front of somebody that they could pick up. The folks at the demo I saw wanted to do this for folks affected by one of the many Californian wildfires (anytime I tell this story I’m asked “which one?” and, yeah, fair). Basically, you’d just straight-up spawn tokens in locations affected by the first (after fires had passed of course) and that might guarantee that only the folks who owned the houses would pick up the tokens. And, I’ve seen other really cool uses for blockchain tech… truly decentralized TLS certificate verification, for example, is greatly needed at the moment. I’ve seen cool projects that help ground-level artists earn royalties on art and sounds they generate, and I’ve seen crowd-sourced delivery funded through blockchain, making third parties defunct and the process cheaper. But to be completely honest, this whole “yes let’s build a platform to trade shit, what are we trading? Oh, the stuff that didn’t exist before we made this platform” — that really bores me to death, and I find it an utter waste of a technology that could bring really cool things. But instead people want to virtualize trading cards or whatever.

So I’ll probably talk about blockchain tech more in this blog as well, but I wanted to offer some of my disdain for the current state of the system. Huzzah.

lordinateur.xyz