Forest full of wild garlic. Picture by Rosmarie Voegtli via License: Creative Commons


The philosophy of the longest chain is everywhere

A Story about Bitcoin and its connection to nature

The blockchain is a chain of blocks that are glued together by work proof. This produces a mechanism that is unique in technology — but almost ubiquitous in nature. Maybe that’s what makes Bitcoin and Blockchain so fascinating.

The Bitcoin white paper is relatively short and largely without mathematical formulas. Only at one point does Satoshi present a calculation in it. One could assume that this means something. (I get commissions for purchases made through links in this post.)

It’s about a scenario “where an attacker tries to cre ate an alternate chain faster than the honest chain”. Bitcoin, you have to know, lives from the fact that a transaction that has become part of the blockchain can no longer be undone. That alone is the purpose of a blockchain — it creates immutability. The mechanism for this consists of two building blocks:

First, it is difficult to create a new block that can be appended to the blockchain. This is the mining: you have to do a proof of work by calculating a hash (*) that meets certain requirements. Depending on how much computing power the miners invest in total, the more difficult it is to find this hash. The hash then becomes the ID of the block attached to the blockchain.

Second, the ID of the previous block is included in the data used to calculate the hash. The consequence of this is that the blocks are “chained”. If you rebuild an old block, you must rebuild all the blocks that follow it. For example, if you want to recalculate the Genesis block, you have to invest as much “hash power” — i.e. the computing power used for proofs of work — as Bitcoin has previously invested in total. The amount is insanely large and is constantly growing.

It’s easy for users to know if they have the correct chain of blocks: They simply check whether their chain has the most work evidence. This concept is called (simplified) that of the longest chain: The longest chain is the valid chain.

The race between the two chains

In the whitepaper, Satoshi tests his concept against a certain type of attack: The attacker tries to replace the current chain with an alternative chain. Suppose I sell you my car. You send me a Bitcoin, and after I get a confirmation, I give you keys and car papers. You get in, drive off — and now mine an alternative chain in which this transaction does not go to me, but to you. Half an hour later you publish this chain, and if it has more proof of work, it will overwrite the other chain — the one I thought was valid. The result: you have a car and I have nothing.

Satoshi describes this process as a “race between an honest chain and an attacker’s chain. He characterizes it as a “Binomial Random Walk. This is a mathematical model that describes a movement of random steps. It is suitable for the calculation of non-deterministic time series and is used, for example, to model stock prices. Satoshi defines the rules of the race in a rather simple way: “The success event is that the honest chain is extended by one block, which increases its advantage by +1, and the failure is that the attacker’s chain is extended by one block, which reduces the distance by -1.” The success event is that the honest chain is extended by one block, which increases its advantage by +1, and the failure is that the attacker’s chain is extended by one block, which reduces the distance by -1.

Then he models this race mathematically:

p = probability that an honest node will find the next block
q = probability that the attacker will find the next block
qz = probability that the attacker will ever catch up on the residue of z blocks

This leads to the following consequence: “Under our assumption that p > q, the probability decreases exponentially as the number of blocks the attacker has to catch up increases. If the probability is against him and he doesn’t make a happy leap forward early, his chances become infinitesimally small if he falls further back.”

Then he “discusses” “how long the recipient of a new transaction must wait until he is sufficiently certain that the sender can no longer change the transaction”. So how many confirmations do I have to wait until I can be sure that you really paid for my car? Satoshi expresses this in some mathematical formulas …

To calculate the probability that the attacker could catch up now, we multiply the Poisson density for each sum of progress he might have made by the probability that he could catch up from that point on:

We convert the formula to avoid adding the infinite decimal places of the distribution…

… translates them into code …

… and lists the probabilities that an attacker will win the entire race:

The result is that with a progressive number of blocks under which a transaction is buried, the probability becomes minimal even if the attacker invests more hash power than the honest miners. The basic concept — proof of work and the longest chain — ensures that Bitcoin’s past is more chiseled into stone with every minute that goes by and that it becomes exponentially more difficult to disrupt the integrity of the data the more blocks are above it.

The principle of the longest chain is everywhere

Why is this so important? We have a system here in which every success strengthens past success — and past successes make future successes more likely. The fact that a chain is the longest chain increases the probability that it will also be the longest chain in the future.

That doesn’t sound particularly new at first, but rather familiar — and that’s exactly what makes it so exciting.

The principle is well known in many areas. When the bear’s garlic spreads in the forest, the entire forest floor will be covered with bear’s garlic after a few years. The past successes — the germination of soil — increases the probability that the wild garlic will colonize even more soil. In this way, the biosystem strengthens itself. Many forests in which only one type of tree grows are a product of this process; foresters have been fighting against this process for centuries by preserving the mixed forests. Where this does not happen, forests often end up as monocultures.

This principle is also found in many animal species when an overpopulation of one species makes it almost impossible for another species to regain space organically. Once an ecosystem has lost its balance, it becomes difficult to restore it; without external influences, it is often virtually impossible.

It is also true in markets. Once a company has gained some power, future success will come almost by itself. It is almost impossible for new companies to compete with market leaders who have decades of reputation with customers, networks of suppliers and wholesalers, patents, product development experience and years of marketing campaigns. This is only possible if a new player has special advantages, such as new technology.

On the Internet, for example, Amazon and Google seem to be firmly in a quasi-monopolistic position. Past successes — the number of customers or users — are incorporated into data, and this data is used to make the product better. In order to deliver such good product recommendations as Amazon, you would have to have as many customers as Amazon, and you will only get them if you have such good product recommendations as Amazon … Amazon builds on the longest chain, and that increases every day.

This principle, also known as the “network effect”, is almost everywhere. It can also be found psychologically. As soon as a person has decided on an opinion, it becomes more and more difficult to move him to another opinion. With a kind of “mental proof of work,” he will inform himself through media that strengthens his opinion, exchange with like-minded people who confirm his opinion, and use much more intellectual work to justify his own opinion and immunize it against criticism rather than question it. Even if he recognizes an argument against his opinion — a “proof of work” — as valid, this will not cause him to seriously question his opinion.

Those who have once “completed” with another person will often never again be able to meet them as impartially as it would be necessary to reconcile; those who love another person, on the other hand, will use their spiritual energy much more to glorify that person instead of soberly-critically seeing him. The fate of many relationships and marriages stands or falls with this kind of proof of work. Once one side — or both — have decided to hate the other, more and more negative proofs of works are collected. Once the chain of negative perceptions has reached a certain length, it is hardly possible to overtake them through the chain of positive perceptions. No marriage therapy, no shared experiences can help if the negative chain is too long.

One finds this principle of the longest chain actually everywhere — where there is life. But can it also be found in technology?

Autonomy from the social world will only be possible if the mechanisms of the social world become technology.

Of course, technology is used as the tool of the longest chain. Market leaders usually have the best technology and use it to maintain their position in the market, and this has the effect that the more a technology spreads around the world, the more past successes it has. But it is rather a mechanism of the market than a property of the technology itself that creates a certain function. This remains neutral. A hammer does not get any better if it has often succeeded in hammering in a nail or if many people use it.

For most technical artifacts, past successes not only make the likelihood of future success not greater, but smaller. A hammer wears out, an engine wears out. The only example I can think of a technology that becomes stronger by itself through past successes is artificial intelligence. A self-learning program actually becomes the better the more tasks it has successfully solved in the past. It is no coincidence that this is an area that tries to give a technical thing properties that are actually reserved for humans or living beings.

But even here it is questionable whether the effect of the longest chain really works. The chances of a Go AI defeating another Go AI do not grow with the number of past successes. In itself, the mechanism of the longest chain is something that belongs to the realm of life and the social. To even begin to incorporate it, technology must imitate processes from nature in an extremely advanced way.

I think Bitcoin is the first example that the principle of the longest chain has become an integral part of technology. Proof of work and the longest chain are everything at Bitcoin, and without them, Bitcoin would be nothing.

But what exactly does Bitcoin use this principle for?

At its core, it is about maintaining the integrity of data. Once you have paid, you have to be sure that this payment will continue to apply in the future. In itself, however, data integrity is neither a new nor an unsolved problem. One can prove with a simple hash that data has remained unchanged; with chains of hashes, it is even possible to prove that a certain sequence of changes has been adhered to. The news is that Bitcoin does this autonomously from the social world.

To prove the integrity of data without a blockchain, you need someone to provide the hash. When you download software and then check the hash to see if the software has been modified, the author of the software must provide the hash. Integrity does not come from the technology itself, but from a social mechanism — trust in the originator and trust that the hash was actually obtained from the originator.

Bitcoin is now replacing this social mechanism with a technological one. The data itself proves that it is legitimate — that past information has remained unchanged and that newly added information complies with the rules. This is the only way Bitcoin has this amazing effect of behaving in part like an object in the physical world: Bitcoin is scarce and unchangeable. This is otherwise simply impossible with software because there is always someone who can change it; immutability with software or data is usually a social trait: one trusts that the people who could change data will not do so because social mechanisms — such as laws, treaties, or their reputation — prevent them from doing so.

Bitcoin creates data integrity out of itself. This autonomy from the social world only becomes possible because Bitcoin pours a core mechanism of the world of nature and society into software — the principle of the longest chain. And that could be exactly what makes blockchain technology so fascinating.

The Startup

Medium's largest active publication, followed by +526K people. Follow to join our community.

The Cryptocurrency Consultant

Written by

Bitcoin, Blockchain and Cryptocurrency Educator. Passionate Writer. My talent is to easily explain complicated contexts.

The Startup

Medium's largest active publication, followed by +526K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade