Home > web3.0 > Learn more about blockchain principles in one article

Learn more about blockchain principles in one article

WBOY
Release: 2024-03-07 09:07:06
forward
925 people have browsed it

Blockchain technology is a magical thing. For many techies, this is just a masterpiece. For such a powerful thing, do you know what the principle of blockchain is? Below, the editor will analyze and analyze what the principle of blockchain is? Blockchain is an important concept of Bitcoin. The currency is connected to the Internet Finance Laboratory of Tsinghua University PBC School of Finance. , Sina Technology released the "2014-2016 Global Bitcoin Development Research Report" and mentioned that blockchain is the bottom layer of Bitcoin. technology and infrastructure.

Blockchain is essentially the underlying technology of Bitcoin, which is a decentralized database system. Blockchain uses encryption technology to generate a series of data blocks. Each data block contains information about a transaction on the Bitcoin network, which is used to verify the validity of the transaction and generate the next data block.

Learn more about blockchain principles in one article

What is its principle?

Seeing the different definitions of blockchain, I began to realize that my previous explanation of this concept was always Confined to Bitcoin. The definition of blockchain is not unique and clear. Here, I would like to share some of my personal insights on the characteristics of "blockchain" based on research papers:

Use a data structure in the form of a "hash chain" to save underlying data (described below)

Multiple nodes participate in system operations (distributed)

Reach consensus (consensus protocol/algorithm) through a specific protocol or algorithm to ensure the consistency of basic data.

Bitcoin is one of the most representative and influential applications in blockchain technology. By understanding how Bitcoin utilizes blockchain, we can more easily understand other kinds of blockchain applications.

Before talking about the application, it is most important to understand its technical nature. All answers to blockchain first mention the intangible characteristics of blockchain, so the first thing to understand is how it is implemented?

Essential knowledge; the one-way nature of the password Hash() function: Hash(x) = y, it is difficult to find the y

hash chain of x: if there are data blocks A, B, C in sequence. Then we can calculate a hash value like this. Note the "||" splicing

H0 = Hash(A)

H1 = Hash(B || h0)

H2 = Hash(C || h1 )H2 is the hash header we calculated. Now, why we call this thing a hash chain, because the value of h2 depends on the content of the previous series of data and the order of calculation. If you know h2 now and someone else holds A, B, C, no matter if he modifies any of A, B, C or the order of A, B, C, you cannot calculate the correct h2 again.

Well, in fact, the concept of blockchain makes a bit of sense here. Isn't it? "Blockchain word" is the translation of blockchain in English. If understood literally, a block of data "composed" of chains is enough to explain its basic meaning. The Bitcoin blockchain is actually a variation of a hash chain (note that Bitcoin added the rules for nonces and special requirements for nonces described below to implement a proof-of-work consensus mechanism). , rather than a necessary feature of blockchain). How to change? Add a random number (Nonce)

Learn more about blockchain principles in one article

Assume that there are now sequentially generated data blocks A, B, C. Let's calculate the hash header like this. Note the "||" splicing

H0 = Hash(A || Nonce0)

H1 = Hash(B || h0 || Nonce1)

H2 =Ha Hash (C || h1 || Nonce2)

Here we also add an additional requirement, that is, h0, h1, h2 must all start with the specified 0 digits, for example, each hash value must Start with 5 0, then h0, h1, h2 it should look like this (00000 *****************)

After adding this requirement, h0, h1, h2 are not so easy to calculate because you can't invert the input according to the form of the output and give A, B, C, it can only be to keep changing the Nonce to do an exhaustive calculation and then find the Nonce value that satisfies the requirements so that h0 , h1, h2 meet the requirements.

Everyone knows what the so-called miners are doing, which is accepting broadcast blocks of data and then calculating the head of the current hash chain. After a successful hash has been calculated, everyone will be notified. I found it myself and let someone else calculate the next hash header. In fact, the nature of blockchain is almost the same here. If everyone in the network defaults to the protocol and only calculates the new header after the longest hash chain, then everything is fine, but if someone wants to do it the same way, he has to have more computing power. When honest people follow the rules, they can calculate a series of forks, or even directly calculate a new chain, so that everyone can admit it.

As for the proof of this difficulty, Satoshi Nakamoto established a probability model of the Poisson distribution, assuming that the probability of a new hash header calculated by an honest node and the probability q of a new hash header calculated by a dishonest node. , calculate the N value.

The meaning of this N value is that after calculating the new hash header h1, and then appending N headers (h2, h3, h4....), the network should recognize the new header. H1. Because at this time, if the attacker wants to successfully launch an attack, he needs to calculate at least one branch with a length greater than N. This possibility is difficult to realize when the attacker does not have 50% of the total network computing power.

Learn more about blockchain principles in one article

So here, it’s clear that blockchain is a clever application of cryptographic tools. Of course, the possibilities of blockchain are not just what I mentioned. Giants from various industries including insurance, auditing, medical care, etc. are exploring its potential. If you have good ideas and think blockchain can bring The benefits will far outweigh the side effects, so you can try it.

The above is the detailed content of Learn more about blockchain principles in one article. For more information, please follow other related articles on the PHP Chinese website!

source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template