Current location - Quotes Website - Personality signature - What does "block" in blockchain mean?
What does "block" in blockchain mean?

“The blockchain is equivalent to this ledger, and the block is equivalent to a page of this ledger. The information carried in the block is the transaction content recorded on this page. Blockchain It is piece by piece, and each piece is filled with transaction records, and together they form a chain, which is the blockchain."

Take Bitcoin as an example, there is a "computing power competition" about every ten minutes. Come compete for the right to keep accounts. It's like saying that your computing power is awesome and you can calculate more, just like your muscles are stronger and you can beat better. Everyone obeys you and lets you keep this account, that is, write a block to the general ledger of the blockchain ( Note that it is not the rights of the content in the block). However, it should be noted that computing power can only determine the probability of winning the competition. It's like saying that there are several lottery tickets in a lottery. Those with more computing power can buy more to increase the probability of winning. However, people who buy more may not necessarily win in the end

Blockchain It is a chain of data blocks guaranteed by such computing power. Starting from the first block, each block collects data according to certain rules, and then attaches a value to the data so that the result of the formed data block after similar one-way function calculation falls within a certain range. By estimating the computing power of the entire network and controlling the size of the result range, we ensure that data blocks that meet the requirements can be found within a long enough time. This calculation result will be included in the next block, and the chained data structure formed in this way is called a blockchain.

Each small ledger is called a block, and each different blockchain protocol (generating different cryptocurrencies) will specify the size of each block (originally Bitcoin is 1M) and the ledger composition area Blocks form a linked list, and the header of the block contains the hash value of the previous block. This is the blockchain. In this way, no one can modify the content or exchange the order at will. If you do this, it means you need to recalculate all special numbers.

Regulations allow everyone in the world to build blocks. Everyone who creates a new block (finds this special number - the SHA256 value has 30 zeros) can get a reward. For the people (miners) who create the new block:

1. No Sender information, no signature required

2. Each new block will add new virtual (encrypted) currency to the entire currency

3. The process of creating a new block is also called For "mining": it requires a lot of work and can inject new currency into the entire economy

4. The job of mining is to: accept transaction information, build blocks, broadcast blocks, and then Get new money as a reward

For each miner, each block is like a small lottery, and everyone is trying to guess the numbers quickly until one lucky person finds a special number. If the hash value of the entire block has many zeros at the beginning, you will be rewarded. I remember a Zhihu answerer gave a vivid metaphor: Blockchain is like a king with a beautiful and beautiful daughter (Block). Many young people are eagerly looking forward to it, and the king’s method is to create a very beautiful story. A rare question for all young people to calculate (learning changes life), whoever can calculate quickly (may also be lucky in the process of calculating the hash value) will be able to win a beautiful woman

For those who want to use this system to collect information For payment users, they do not need to listen to all transactions, but only need to listen to the blocks broadcast by the miners, and then update them to their own saved blockchain

"Block" is also It can be imagined as a box. There are some digital currencies and a small note in the block. The small note records the only transaction information that occurred within these ten minutes. For example - "Little A transferred money to "I gave Little B 100 yuan"; of course, this information must have been encrypted to ensure that only Little A and Little B (through the keys in their hands) have the ability to decipher the real content inside.

After this magical block was created, it was quickly buried underground. As for where it was buried? No one does not know that it is possible to find (find an effective proof of work) only after all computer nodes participate in it and dig deep. Obviously, this is an event with a huge workload and random results. However, for the computer node, once the block is dug out from the ground, he will obtain the valuable digital currency in the block, as well as the tip paid by Little A in the process of "Little A transferred 100 yuan to Little B" . At the same time, for this node, only he has the right to actually record the contents of the small note. This is an honor, while other nodes can only use its copy, a copy that is no longer blessed by digital currency. . Of course, there are some other very special features of this magical block.

The process by which computer nodes can dig out blocks from the ground is called "mining". As I just said, this is a job. It’s something that involves huge amounts of money, a lot of luck, but huge returns. A node from Zhangheng Road, Pudong New Area, Shanghai, China suddenly jumped out and said excitedly: "I dug the block! The small notes inside are all valid! The reward is mine!".

Although the Zhang Heng Road node has obtained the digital currency at this moment, for other computer nodes, because there are other interests involved, they will not choose to believe what the Zhang Heng Road node says by default; based on the mutual distrust of strange nodes In principle, they took the block (copy) so-called mined by Zhang Henglu node and began to verify whether the information on the small note in the block was true and valid, etc. In the blockchain world, nodes verify the accuracy of information on small notes, or indirectly or directly determine whether the node that successfully mined the block is lying. (How to define the authenticity and validity of small note information will be explained later, so I won’t go into details here). During the verification process, each node will directly express its recognition (accuracy) and attitude towards the Zhang Heng Road node through the following two actions: stopping half or even 80% of the mining process; successfully mining the Zhang Heng Road node The outgoing block (copy) is appended to the end of its own blockchain. You may be a little confused: if you stop, you may have performed 80% of the mining activities, so wouldn’t 80% of the previous work have been in vain? ! Then, what the hell is at the end of the blockchain? Regarding the first confusion. I want to say that what you said is absolutely correct, but there is no way. The reality is so cruel. Even if you have done 80% of the work, you have to give up. This 80% of the work can almost be regarded as wasted work and an absolute waste of money and labor. . The second confusion is, what is the blockchain and the end of the blockchain? This is not explained clearly in advance, but you can simply imagine: blocks are periodically generated and mined, and a computer node may have executed "take blocks from others" N times in advance - > The process of "verifying the validity of small notes" must have already stored N blocks on its own node, and these blocks will be neatly arranged in a chain in chronological order. Yes, this chain is the blockchain you have always thought of. If you still don't understand, it doesn't matter. There will be many opportunities to study in depth later in the article.

Enter the more microscopic world of the block to find out what the small note is, its origin and its lifelong mission: when initiating a transaction, initiate The person will receive a small note, and he needs to write the transaction record on the paper, such as "Stealing transfer of 40 yuan to Zhang San". Miraculously, the moment you finish writing, the transaction record will be automatically formatted on the back of the note to include at least two important fields: "input value" and "output value"; "input value" is In order to record the valid source of digital currency, the "output value" records the object to which the digital currency is sent. The note just created was immediately marked as an "unconfirmed" note. A small piece of paper that successfully mines a block from the ground and is eventually connected to the blockchain will initially be marked as "valid." If this valid small note is used as the input value of other transactions, then this valid small note will soon be marked as "invalid". For various reasons, blocks are disconnected and discarded from the chain. The small slips of paper that were once marked as "valid" in this block will be re-marked as "unconfirmed". There is no concept of account balance in the blockchain. The digital assets you really own are actually a piece of transaction information; you can know the balance in your digital wallet through simple addition and subtraction operations. The above 1, 2, and 3 are just the knowledge points forcefully instilled in you at the beginning of the conclusion. Some of the descriptions may be a bit confusing and make you feel confused. Only by understanding the overall blockchain can you have a more comprehensive understanding. Therein lies the mystery.

Block capacity, when Bitcoin was created, or stipulated in the source code, the block capacity was 1M. The reason why it was originally designed as 1M was to prevent DOS attacks. On the other hand, when Satoshi Nakamoto created the blockchain, the capacity was 32M, but he changed the block capacity to 1M through an inconspicuous Commit with the description "Clear up". In order to prevent the blockchain from The volume has grown too fast, adding some mystery to the issue of block capacity. A capacity of 1M means that the maximum number of transactions that Bitcoin can process is about 2,400 (486,882 is very close to the size of block 1,034.39).

Blockchain, to put it bluntly, is a small notebook for distributed accounting, a tool used for accounting, and is based on the technical foundation of cryptography. Once the data transaction is recorded in the block This book is on the chain, and the data cannot be tampered with or repudiated. The Internet is the transmission of value, and the blockchain is the transmission of trust. Under the premise that blockchain technology serves as a credit endorsement, each node in the blockchain changes from its own single center to a unified multi-center with multi-party participation. Transaction transmission can be achieved without the participation of third-party institutions, improving efficiency.