A blockchain is a distributed, public database. In the context of Bitcoin, this database is used to manage monetary transactions. The term “chain” comes from the chain to which transactions are added in chronological order.
So the blockchain is a kind of logbook that records all data chronologically. This is the basement of BTC. Speaking about books, cryptocurrencies are now also accepted at many sportsbook providers. Check them out at BBSB. What is the purpose of something like this? Let’s say you want to make a payment and you want to do it by means of an electronic money transfer, that is, not against cash. Today, you rely on an intermediary or a trusted third party, i.e. a bank, to process the transaction. This ensures that the money actually ends up with the target person and that the amount is debited to you. No money can be “generated” or “lost” during the transaction. The amount that leaves you ends up with the recipient, except of course for the fees incurred for the service.
If you want to make this payment directly, peer-to-peer, you want proof that the agreed amount will actually pass to the target person. Since an electronic money transfer has no physical component, such as a bank bill, this is not so easy. In addition, you both want to ensure that the amount cannot be subsequently increased or reduced. If there is no central authority that both parties trust, this becomes difficult. This is where the blockchain comes into play.
And how does the blockchain solve this problem?
A solution has been found to the “problem of the Byzantine generals.” That is, the question of how to ensure consensus on a “truth” in a public network.
First things first: What does blockchain have to do with Byzantium?
Computer science likes to use stories to define problems. The Byzantine generals’ problem is a distributed voting problem. Let’s transfer the problem to a less warlike situation:
Let’s put ourselves in the situation of a group of people who want to get together for a party. The time when the party is to start is not yet clear. Unfortunately, the people can only talk to each other in direct conversation, i.e. 1:1. As another challenge, there are some “black sheep” among them. That is, people who want to sabotage the party and deliberately pass on a false start time.
How do you get a secure solution without an organizer or Whatsapp?
The document “Bitcoin: A Peer-to-Peer Electronic Cash System” published under the pseudonym Satoshi Nakamoto presents an algorithm that solves the problem of the Byzantine generals for the first time. It is based on what is called a proof-of-work, the computational solution to an encryption problem.
You’ll have to explain that in more detail. First, let’s start with the concept of encryption. The image of an egg helps here (At this point, many thanks to my colleague Marc Pouly for this brilliant analogy). I’m sure you’ve all made a fried egg before. Cracking it is easy. Reversing the process, that is, turning a fried egg back into a whole egg, is not possible. The same thing is done in computer science by a hash function, a non-reversible encryption function. The fried egg is equivalent to the hash value and the breaking of the egg is equivalent to the hash function.
Now for the proof-of-work. Imagine a chicken producing individual eggs, depending on the food combination you feed it. Your task now is to produce such eggs whose fried eggs achieve a specific, predetermined shape. This task cannot be calculated in advance and is not reversible. You simply have to try it out. What is certain is that the required fried egg shape is producible if you just try often enough. So you will be busy feeding chicken and cracking eggs for quite a long time. With a lot of work, however, you will get it right. Forget about your cholesterol level. Once you’ve done it, anyone can very easily create such an egg, and thus an appropriate fried egg, from your chicken and the food you found. This approach is called proof-of-work because you literally have to “work out” the solution. In the blockchain, the shape of the fried egg corresponds to the condition that the hash value must start with a certain number of zeros. Since the result is probability distributed, a computer can accomplish it in a given amount of time. The more zeros, the more computing time for the proof-of-work.
Now let’s get to the actual blockchain, which can be thought of as a chain. I feed my chicken:
- the information I want to store in the blockchain,
- the current time,
- the last fried egg in the blockchain…
- and an additional food that uses the above three “feeds” to create the required fried egg shape.
Blockchain explained simply using chicken and egg. Chicken and egg: blockchain simply explained.
I have to work out the additional feed using the proof-of-work described above. In blockchain, this is called a nonce. It has to be recalculated every time, because the information (1.), the time (2.) the last fried egg (3.) are different each time. Once I have done this, I can append the created egg to the chain. Everybody can check if the egg is rightfully hanging in the chain. He only has to break the egg and gets the predefined shape.
I can read the fed components (information, time, last fried egg, additional food) from the outside by holding the egg against the sun. Thus I can access the information at any time.
Can’t I then also change the information?
That is exactly not possible! If I would change them, then my additional food, Nonce, does not fit any more and everyone can check this by breaking my egg. In the same way I cannot hang an egg in between in the chain, because with the following egg the fried egg of the predecessor is inserted. So I have to change the whole end of the chain. But this is, due to the proof-of-work, very time-consuming. So that you are quite sure that nobody manipulates the chain with much effort, you distribute now very many copies in the whole Internet. Each new egg is attached to all chains. Maybe one chain fails or is changed wantonly. In this case, the longest chain is the valid chain.
Why is this now secure?
Proof-of-work (explanation at binance.com) ensures that manipulations require a lot of computing power. At the same time, distribution over many instances makes local modification impossible. This makes it uninteresting to try to change individual transactions. It is more interesting to earn money through mining.
Mining. How does that fit into the picture?
For the whole system to work, it needs independent chicken feeders, so-called miners. In other words, people who search for the right food combination for given information. After all, as a distrustful contemporary, you want to make sure that your contractual partner doesn’t manipulate the information and put it into the blockchain. That way, he could change the transaction. In the beginning, Bitcoin users did that themselves. Today, you often leave the finding, let’s stick with our chicken example, of the right supplementary food to professional communities, companies, and even entire states. These miners “dig” for nonce (or chicken feed) so that the result meets the requirements. We are not talking about one or two, but a great many. They work on the solution in parallel. The first one wins. And because this is quite hard work that consumes quite a lot of computing power, the lucky finder is rewarded. This reward comes in Bitcoins, an implementation of the blockchain, from a transaction fee and a small portion of newly generated Bitcoin currency.
How is the blockchain methodology revolutionary?
Blockchain technology and bitcoin are getting more and more popular, but why? Find out more at dbalears.cat. As we have seen, the blockchain methodology is made up of various components that come together to form a big picture. From a computer science perspective, it’s exciting because until now in the database space, the focus has always been on whether the database is coherent (consistent). The blockchain represents a distributed, public database where the focus is on the individual transaction, and thus the question: is the transaction correct?
From an economic perspective, it is exciting because until now, a trusted intermediary (trusted third party) was always needed when two parties transacted a mutual transaction or contract. In the financial sphere, the role of the intermediary is played by banks. Bitcoin is a currency that eliminates the need for banks as intermediaries.
However, the blockchain is not limited to the financial sector. With this technology, it suddenly becomes possible for contracts between two parties that potentially distrust each other to be settled on a public network. The role of the intermediary is assumed by the community. In principle, this could make all intermediaries superfluous. Be it established ones, such as notaries in the contract sector, or newly created ones, such as Uber.