Being a Super Rookie in Blockchain — [Blockchain Overall]

By akohad Oct25,2022


1. What the hell is Blockchain?

Suitable for everyone to read

As a sheepman at OverLabs, I have to tell little lambs about the domain knowledge of blockchain. So, I’ve written this series of stories for the little lambs of OverLabs, to help them better run on the blockchain grassland. Now, because we need talented people more and more, I’m going to open this bible to save the world and OverLabs.

This story is the first of a series for those wanting to start a blockchain career. You must read this series of stories to be a developer, designer, or financial architect in the blockchain industry. It will be very long because there are so many things to know to work in the blockchain industry, even though you are a professional in your industry, like Web2.

Hold tight if you googled ‘How to begin blockchain career,’ ‘How to start blockchain career,’ ‘Getting a job at blockchain,’ ‘Being a blockchain designer,’ ‘Being a blockchain financial architect,’ and ‘Being a blockchain developer.’

The first part of the series is ‘Blockchain Overall,’ which tells you domain knowledge about blockchain. The first topic of the part is ‘What the hell is Blockchain?’ Let’s get into it.

1.1 Block

First, we have to know about ‘Block.’ It is a bundle of data. We can think of it as an A4 paper.

1–1 Louis has 100 dollars

There is a sentence like ‘Louis has 100 dollars.’

1.2 Hash Function

And there is a function called ‘Hash Function.’ The Hash Function returns a 32-character string when putting a sentence(clearly ‘string’; any series of characters; it can be a line or multi-lines) into the hash function. Those characters in the returned string are ones of 0~9, A, B, C, D, E, F. (case insensitive)

1–2 Hash Function

As you can see in Image 2, if we put the sentence ‘Louis has 100 dollars’ into the Hash Function, it returned a string that said ‘0x646e7c6e249e9a73fa8453099c7164fe713af91e’. The ‘0x’ is a prefix to represent that it is hexadecimal. As you know, binary uses only two characters, like 0 and 1. Hexadecimal uses 16 characters, 0~9, A, B, C, D, E, F. Forget about it cause it is not essential if you are not a developer.

There are two essential characteristics of the Hash Function. The one thing is that it will return the same result whenever you put the exact specific string into it. The second thing is if you change even one character of the string to put into the Hash Function, it will return a totally different string. You can see this in the following image.

1–3 Hash Function’s characteristics

The sentence was changed to ‘Louis has 101 dollars.’ You can notice that only one character has been changed if you compare images 3 and 2. You can see one more thing. The result string has been totally transformed!

The result string from the Hash Function is called ‘Hash Value.’ Call ‘Hash.’

Because of these characteristics of the Hash Function, nobody can find the original sentence(clearly ‘string’) by a result string(clearly ‘hash’). As a result, finding a specific string that makes a particular hash made by the other string with the Hash Function is impossible.

Let’s dive deep into this. At hash value, one of 16 characters can be in each space of 32 spaces. The number of hash can be 16³². It is about 3.4*10³⁸. Million 10⁶, Billion 10⁹, Trillion 10¹², Quadrillion 10¹⁵, Quintillion 10¹⁸, Sextillion 10²¹(careful pronunciation), Septillion 10²⁴, Octillion 10²⁷, Nonillion 10³⁰, Decillion 10³³= 1,000,000,000,000,000,000,000,000,000,000,000. I don’t know anymore.

Like this, there are so many hash values that can be derived. So, finding the original string that generates the same hash value as the hash value of ‘Louis has 100 dollars’ is impossible. You can’t even if you use the supercomputer stolen from National Oceanic and Atmospheric Administration.

1.3 Chaining Mechanism

At this point, we should know that we are sharing the Hash Function. It means Ben, Tim, Louis, and everybody uses the same Hash Function.

See the A4 paper below.

1–4 The first A4 paper

Write the hash ‘0x646e7c6e249e9a73fa8453099c7164fe713af91e’ derived from the Hash Function by the sentence ‘Louis has 100 dollars’ at the bottom of the A4 paper.

Then, take another A4 paper and prepare your mind to write the sentence ‘Louis sent 5 dollars to Ben.’ Before you do it, you should write the hash value of the previous A4 paper. Then write the sentence ‘Louis sent 5 dollars to Ben’ in the following line. After then, you have to get a new hash value from the Hash Function by the total content of this A4 paper,

Louis sent 5 dollars to Ben

, and write the new hash, ‘0xd2c82f2e5fa236e114a81173e375a73664610998’, at the bottom of the A4 paper.

1–5 The second A4 paper

In a new A4 paper, write the sentence ‘Louis sent 3 dollars to Tim’ in the manner described above.

1–6 The third A4 paper

Now, focus on your mind; the universe will help you to understand. At first, Louis had 100 dollars; then he sent 5 dollars to Ben and 3 dollars to Tim. Now remains for Louis is 92 dollars, Ben has 5 dollars, and Time has 3 dollars. ( Louis is still wealthy )

Get together all the A4 papers.

1–7 Paperchain = Blockchain

1.4 How to prevent fraud

Suppose someone(clearly an ‘attacker’) has replaced the first page. He wanted to make Louis a beggar.

1–8 Attacker has replaced the first page’s sentence

He wrote the sentence ‘Louis has 50 dollars’ at the top, but he wrote the same hash value at the bottom as the one at the top on the second page. We all can put the sentence ‘Louis has 50 dollars’ to the Hash Function and protest that this A4 paper is a fraud! Because the derived hash value will not be the same as the hash value derived by ‘Louis has 100 dollars’

If the attacker correctly used the Hash Function, the hash value written at the bottom would be totally different. Then, because the hash value at the bottom differs from the hash value at the top on the second page, we all can protest that “Either the first or the second page is a fraud!”

1–9 Attacker has replaced the first page’s hash value

If Louis wants to lie that he sent 2 dollars to Ben, he should modify the sentence on the second page. However, if he does like that, anyone can protest, “Louis is a liar!” Because the hash value at the bottom differs from a hash value derived by ‘Louis sent 2 dollars to Ben’ [Image 10]. And because the hash value at the bottom differs from the top hash value on the third page. [Image 11]

1–10 Louis has replaced the first page’s sentence
1–11 Louis has replaced the first page’s hash value

In conclusion, no one can modify or delete.

1.5 The first Blockchain we made

Now, replacing A4 papers with blocks, we created a new Blockchain! As we found above, the manner follows. Write a new hash value to the current block, derived from the Hash Function(SHA3 for Ethereum) by the previous block’s hash value plus the current block’s data.

As you noticed, the first line on the first page is a sentence(clearly ‘string’), not a hash value. This means we cannot find the previous block’s hash value for the first block. Be not stupid. There is indeed no last block for the first block. We call this first block ‘Genesis Block.’

If you have any questions, please follow my Twitter and tweet me.
Louis’ Twitter

New to trading? Try crypto trading bots or copy trading


Source link

By akohad

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *