Simple and clear blockchain technology

blockchain technology

insert image description here
When I first entered the university, I was a novice at the time. The blockchain my classmates talked about made me stunned, but at the time I heard it was very tall. In the end, I only knew that the source was a tradable currency. algorithm for encryption. At that time, the excited hands were shaking, and I wished I could learn this knowledge immediately. Some people think that the product of Bitcoin is the blockchain, but the operation of Bitcoin is inseparable from the blockchain. So what exactly is the "thing" of the blockchain?
Come and listen to the official answer - find Baidu blockchain

  1. Blockchain is a term in the field of information technology. In essence, it is a shared database, and the data or information stored in it has the characteristics of "unforgeable", "full traces", "traceable", "open and transparent" and "collective maintenance". Based on these characteristics, blockchain technology has laid a solid "trust" foundation, created a reliable "cooperation" mechanism, and has broad application prospects.
  2. The blockchain originated from Bitcoin. On November 1, 2008, a self-proclaimed Satoshi Nakamoto published the article "Bitcoin: A Peer-to-Peer Electronic Cash System"[4], which elaborated on the basis of P2P The architectural concept of the electronic cash system of network technology, encryption technology, time stamp technology, blockchain technology, etc., which marks the birth of Bitcoin. Two months later, the theory entered into practice, and the first genesis block with serial number 0 was born on January 3, 2009. A few days later, on January 9, 2009, a block with serial number 1 appeared and was connected with the genesis block with serial number 0 to form a chain, marking the birth of the blockchain.
  3. Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain (Blockchain) is an important concept of Bitcoin. It is essentially a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a series of data blocks generated using cryptographic methods. The data block contains a batch of Bitcoin network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block [8].
  4. …slightly

Getting to the point: The underlying concept of blockchain

I will use a conceptual diagram to more intuitively show the underlying principles of the blockchain:


This is the underlying concept of blockchain. Once you have mastered the underlying concept, you can go further and learn about blockchain!

The main event is here, the story is told

"Children", move the bench and sit down, let's start telling stories!

Once upon a time there was a mountain. There was a temple in the mountain. There was an old monk and a young monk in the temple. The old monk said to the young monk: "Once upon a time there was a mountain. There was a temple in the mountain. There was an old monk and a young monk in the temple. The old monk Said to the little monk: "Once upon a time there was a mountain. There was a temple in the mountain. There was an old monk and Xiaohe in the temple...

Ah, this is wrong, hahahaha!

Here I will split the blockchain into a block + chain situation to explain:

start

Suppose we are now living in a village called Pineapple Village, there is no physical currency, and all transactions rely on everyone to keep accounts.
insert image description here
For example, there is a boy who sells meat. One day, Lao Wang asked Xiao Ming to buy 100 yuan of meat, so Xiao Ming and Lao Wang broadcast to everyone, saying that Lao Wang's account was reduced by 100, and Xiao Ming's account was increased by 100.

insert image description here
At this time, everyone will take out their own ledger to record this transaction information.
insert image description here
In this case, everyone has to make records in their own account books for any one transaction, and most of them have nothing to do with themselves, so the village chief temporarily came out to act as a bookkeeper. After that, any transactions in Pineapple Village will be counted by Mr. Bookkeeper, and today's accounts will be liquidated every afternoon, and the accounts will be published.
insert image description here

For everyone to check whether there is a problem, if everyone agrees that there is no problem with today's accounts, they will take out their own pen and paper, copy the information on the accounts home, and write down today's date and save it, so that everyone can be saved. The hassle of keeping accounts all the time.
insert image description here
In this way, Pineapple Village will generate a ledger every day, such as the ledger on February 10, the ledger on February 11, and the ledger on February 12. These ledgers exist independently, so we can regard each ledger as a block, such as block 1, block 2 and block 3. The block is thus generated. A block can be simply and rudely understood as the packaging of multiple accounts.

insert image description here
If one ledger is published a day, all the accounts are packaged into a block today, and the block packaging time can also be changed. For example, once every 10 minutes and once every 30 minutes, the corresponding generation of a block is 10 minutes and 30 minutes. To generate a block and chain is to link the ledgers of two adjacent days.
insert image description here
Pineapple Village conducted a one-day transaction. After the transaction, the accountant announced the account, and there was a closing balance. For example, Lao Wang originally had 1,000 yuan, and three transactions were conducted today. According to each person's transactions, Mr. Bookkeeper calculates each person's account balance. When the next day's bookkeeping, Mr. Bookkeeper will write everyone's yesterday's balance at the beginning of the account book as the opening balance. Today's transactions will be based on yesterday's balance, because yesterday's balance is the same as the balance at the beginning of today's account. We can simply understand that yesterday's ledger and today's account are linked by carrying forward the balance, and this balance naturally acts as a chain linking the two ledgers together, which is similar to the chain in the blockchain.
insert image description here
But at this time, a problem suddenly appeared, that is, the bookkeeper is busy with bookkeeping. Where does his income come from? Without income, no one is willing to be the bookkeeper, so everyone agreed that every time a transaction is completed, 1 yuan will be paid to the bookkeeper as a reward, similar to the handling fee. The purpose is to support Mr. Bookkeeper. Mr. Bookkeeper has to record more than 500 transactions and earn 500 yuan a day.
insert image description here
The old man who moved bricks was jealous when he saw the income of Mr. Bookkeeper. Mr. Bookkeeper could earn 500 yuan by keeping an account every day, while he only earned 150 yuan a day from moving bricks. This is not fair.
insert image description here
Soon everyone found out that Mr. Bookkeeper's income was very high, and everyone wanted to be Mr. Bookkeeper. After some discussion, everyone decided to flip a coin to decide who became today's Mr. Bookkeeper. Everyone decided the rule. It's fair, and I agree with this rule. In the end, everyone reached a consensus. insert image description here
The method of flipping a coin to select Mr. Bookkeeper can be understood as an election mechanism called a consensus mechanism because everyone agrees. insert image description here
In the blockchain, we select the bookkeeper through the consensus mechanism. Now there is a problem, that is, some people are far away from the place where the accounts are published. It is not very convenient to go to the announcement every day to copy the accounts. What should I do?
It's very simple. You can copy your neighbor's account, and your neighbor can copy your neighbor's account because you can borrow from each other. It also solves the problem of distance when publishing accounts.
insert image description here
The way neighbors copy neighbors is essentially user-to-user point-to-point information dissemination, and users can connect with each other and finally connect to form a network, and this information transmission method is also the network routing method of the blockchain. Each user is a receiver of information and a disseminator of information. In the process of this information transmission, each resident of Pineapple Village is called a node.
insert image description here
So now someone wants to tamper with this account? In fact, it is very difficult because everyone has a ledger. If you want to change the ledger data, it means that everyone's ledger must be modified again. It's actually very difficult to do. In real life, often only a small number of people are in charge of the ledger, such as accountants, cashiers and so on. The current ledger is centralized, but in Pineapple Village, everyone has a daily synchronized ledger, and everyone gets the same, and there is no centralized phenomenon, that is, decentralization. Therefore, the account book of Pineapple Village is a distributed account book. insert image description here
Now I have obtained several concepts of blockchain. First, the information connection between each node is point-to-point, which is the P2P network routing mode. Second, each node has a synchronized ledger, which is distributed The ledger, and each node has the right to package the account, and who will act as the packager of the ledger is selected through the consensus mechanism and the account packager can obtain handling fees and system rewards. And because of the distributed ledger and time connection, the ledger will be difficult to tamper with.
insert image description here
Summary
The blockchain is now very clear. In fact, it is a ledger that everyone maintains together, and this ledger cannot be changed at will. It is open and transparent, and the account is reliable and decentralized. At this point, you will understand some of the underlying logic of the blockchain. The technical support required by the blockchain includes hash algorithm, Pow workload proof, public and private keys, and Pos proof of equity. The basic concepts are introduced here, and the technical support of the blockchain will be updated in the future. insert image description here
The story is finished here. Okay, thank you for your "listening", and welcome to come next time!

Application scenarios of blockchain

1. Payment and cash transactions
2. Banking
3. Gaming
4. Internet of Things
5. Supply chain finance
6. Copyright protection
7. Automobile industry
8. Logistics chain
9. Cross-border payment
10. Physical assets
11. Medical care
12. Social networking
13 . Cloud Computing
14. Sharing Economy
15. Charity
16. File Storage
17. Big Data
18. Gift Cards and Membership Programs
19. Sports
20. Government Affairs

Summarize

The blockchain is composed of chain+block. At present, it seems that it is more common to develop the blockchain through the GO language. Of course, C and C++ can also be used to develop the blockchain, but the advantages of the go language are obviously greater than those of the two. To understand and learn the go language, you can see my other article GoLang . At present, the blockchain itself is still in the initial stage, so including the information transmission and encryption of the blockchain, quantum encryption and other encryptions appear in this process. In fact, attacks on the encryption algorithm used by the blockchain itself also occur from time to time. Including the blockchain is also an asset identification, a identification of digital assets, but now many of us use cryptographic algorithms, or as the key for us to decrypt, but if you forget the password, it is very likely that your current assets will be lost. If you lose it, you will not be able to get your original assets, so there are still some hidden dangers in asset management, including information transmission and some security. Of course, from a technical point of view, the processing speed of our blockchain itself, or its own scalability, because from the perspective of working mechanism, it is necessary to copy the entire ledger to all participants, so in the blockchain Its operational efficiency and scalability are still relatively limited. We feel that we still need further development in terms of technology.
Distributed
distribution is very simple to understand. In fact, it can be regarded as multiple servers sharing a data block. The official explanation is that distributed computing is a research direction in computer science. The problem that can only be solved is divided into many small parts, and then these parts are distributed to multiple computers for processing, and finally these calculation results are combined to obtain the final result. Distributed network storage technology is to store data in a decentralized manner on multiple independent machines. The distributed network storage system adopts a scalable system structure, uses multiple storage servers to share the storage load, and uses the location server to locate and store information, which not only solves the bottleneck problem of a single storage server in the traditional centralized storage system, but also improves the reliability of the system. performance, availability and scalability.
Compared with other algorithms, distributed computing has the following advantages:
1. Rare resources can be shared;
2. Through distributed computing, the computing load can be balanced on multiple computers;
3. The program can be placed on the computer most suitable for running it;

insert image description here

Guess you like

Origin blog.csdn.net/cout_s/article/details/116400470