Bitpush: A thorough understanding of the operating logic behind the Bitcoin network

Bitpush: A thorough understanding of the operating logic behind the Bitcoin network

Abstract: Many people know the entry channel of blockchain and the originator of blockchain application - Bitcoin network. I believe many friends are familiar with it. But do you really understand the working principle behind the Bitcoin network? The Bitcoin system does not belong to any one person or any company/organization, and there are no employees, bosses or shareholders to maintain its operation. In other words, the Bitcoin system is not controlled by anyone. So why do so many nodes and participants around the world trust it? And how to prevent Bitcoin from being illegally copied?

Many people know the entry channel of blockchain and the originator of blockchain application - Bitcoin network. I believe many friends are familiar with it. But do you really understand the working principle behind the Bitcoin network? The Bitcoin system does not belong to any one person or any company/organization, and there are no employees, bosses or shareholders to maintain its operation. In other words, the Bitcoin system is not controlled by anyone. So why do so many nodes and participants around the world trust it? And how to prevent Bitcoin from being illegally copied?

This Wanxiang Blockchain Classroom will systematically introduce the working principle of Bitcoin, as well as the underlying technology of Bitcoin - the commercial application potential of blockchain beyond digital currency. It is guaranteed to be "plain language", concise and easy to understand. We sincerely invite you to enjoy it carefully~

Trading systems that lack a management center such as a bank usually face the following three major challenges:

· Asset title confirmation

Preventing falsification of transaction information

Determine the reliability and authority of transaction records

However, Bitcoin can cope with these three challenges without a third-party management intermediary such as a financial institution. If you understand how Bitcoin copes with these three challenges, you will naturally understand how Bitcoin works. Let's take a closer look at how Bitcoin overcomes these three difficulties.

Challenge 1: Asset confirmation

When someone publishes a transaction record to the Bitcoin blockchain, how can we be sure that the transaction is indeed initiated by the owner of the Bitcoin and not a fraudster who intends to falsify it? This is where computer encryption technology comes in.

Asymmetric encryption

Bitcoin uses asymmetric encryption technology, which requires a pair of keys. Data encrypted by one key can be decrypted by the other key. During use, one key is made public, namely the public key, and the other non-public key becomes the private key (the public key is similar to an account on the Internet, and the private key is similar to a login password).

How to use this pair of keys to send information? Suppose Star-Lord in Guardians of the Galaxy wants to send a message to Groot saying "Hello, Groot", but he also wants to make sure that the super villain Thanos cannot read the message. What should he do? We can let Groot create a pair of keys, give the public key to Star-Lord, and keep the private key himself. Star-Lord can encrypt the message with the public key, and the encrypted message looks like gibberish. Only after Groot decrypts it with the private key can he know what Star-Lord said.

Digital Signature

Bitcoin also uses this pair of keys in reverse to verify the identity of the creator of the data, that is, to regard the key as the user's digital signature. Let's ask the Guardians of the Galaxy to help interpret this scenario. Suppose Groot wants to send a message to Star-Lord saying "I am Groot", but how can Star-Lord be sure that this message really comes from Groot, and not someone else pretending to be Groot? Groot can encrypt this message with a private key, and after Star-Lord receives the message, he can decrypt the message with the corresponding public key and read the message "I am Groot". And because the corresponding relationship between public and private keys is unique, Star-Lord can successfully decrypt the message with the public key to prove that the message was indeed sent by Groot, the holder of the private key, otherwise Star-Lord would not be able to decrypt the message.

Challenge 2: Preventing falsification of transaction information

If someone made a Bitcoin transaction a month ago and now regrets it and wants to quietly withdraw the transaction, how can this conspiracy of falsifying information fail in the absence of an authoritative administrator in the decentralized system of Bitcoin? This is where the hash algorithm comes in.

Hash Algorithm

Hash algorithms can be used to verify the authenticity and integrity of data. Any information can be converted into a hash value through a hash function, but any change to the original information will make the resulting hash value completely different.

Suppose Star-Lord wants to send the string of numbers "12345" to Groot, but is worried that Thanos will intercept and tamper with the information. He can calculate the hash value of this string of numbers: FE100DDA6D28B2280B34FC228ADAB42E, and then send this string of numbers and his hash value to Groot at the same time. After receiving the string of numbers, Groot also performs a hash operation to see if the hash value obtained is consistent with what Star-Lord told him. If they are consistent, it means that Groot and Star-Lord have the same original numbers, and the string of numbers has not been tampered with or damaged during the transmission process. If Thanos secretly interferes with the digital transmission process, changes the original string of numbers to "12346", and then sends the wrong number to Groot, the hash value calculated by Groot will be: 1761420899A8F0B731A2EE56A6F71567, which is completely different from what Star-Lord gave him, and naturally he will find that the data has been tampered with.

Blockchain is interconnected

In Bitcoin, transactions within a fixed time period are packaged into a block. Each block stores the hash value of the previous block. These blocks are connected by hash values ​​to form a chain structure, which is often called blockchain.

The three blocks in the figure below record information about transactions 1 to 9.

If transaction 3 in the first block is deleted, the hash value in the second block will change, proving that the transaction information in the first block has been tampered with.

Can we try to modify the second block so that the hash value stored in it corresponds to the information in the tampered first block? This also does not work. Because after modifying the information in the second block, the hash value in the third block cannot correspond to the information in the second block, and people can tell at a glance that the second block has been tampered with.

It can be seen that the information on the blockchain cannot be tampered with. If the information in a block is changed at random, it will cause a conflict with the hash value in the next block. Only by modifying the information in each block one by one can the initial information tampering be covered up. In this way, the information of the original blockchain will be completely changed, which is equivalent to creating a new chain.

Challenge 3: Determining the reliability and authority of transaction records

Assuming that someone has tampered with the information in each block and created a new chain, should we choose to trust the new chain or the old chain? How can we determine the reliability and authority of both?

Proof of Work

This is where proof of work comes in. The computer converts the hash value mentioned above into a string of numbers consisting of "0" and "1":

0010111011110100000001000001101010010010001011101111100001001010

We can stipulate that only blocks whose hash values ​​start with 0 can be put on the chain, so there is a 50% probability of getting a block that meets the requirements.

0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Similarly, if we stipulate that only blocks with hash values ​​starting with "00" can be put on the chain, the probability is 25%.

00XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If it is stipulated that the hash value must start with 32 "0"s to be included in the chain, then the probability is only about one in 4 billion.

00000000000000000000000000000000XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The Bitcoin blockchain also has such a rule. However, the hash value of each block on the chain is constant. How can we ensure that a hash value that meets the rules can be obtained when fixed information is input? This requires randomly adding a random value, also known as a "nonce", to each block.

When performing a hash operation, the random number is combined with the data in the block. In the Bitcoin blockchain, computers all over the world must find a random number from a large number of random numbers that can be combined with the existing block to calculate a hash value starting with a specific number of "0" in order to put the block on the chain. This process of finding a random number is proof of work.

This process consumes a lot of computing power and the time it takes to complete is difficult to estimate. In the Bitcoin blockchain, a new block is generated every 10 minutes on average. However, as the overall computing power level in the blockchain has been continuously increasing, in order to increase the difficulty of finding random numbers, the Bitcoin blockchain is also constantly increasing the number of "0"s at the beginning of the hash value.

Longest Chain Principle

The proof-of-work rule effectively limits the rate at which new blocks are generated, so the more blocks there are and the longer the chain lasts, the longer it will last. Therefore, it is impossible for an individual to create a chain longer than the official Bitcoin blockchain unless that person has more computing power than the sum of all the other people in the system.

For the above reasons, when multiple chains appear in the system, Bitcoin users only recognize the chain with the largest number of blocks and the longest existence, and believe that the information on this chain is authoritative and reliable.

Potential application scenarios of blockchain

In addition to Bitcoin, what other application prospects does blockchain have?

We briefly explained above how the Bitcoin blockchain works from three aspects:

· Confirming Bitcoin ownership with digital signatures

Use hashes to verify the authenticity and integrity of transactions on the chain

Use proof of work to prevent false blocks from being added to the chain

It can be seen that Bitcoin is a decentralized ledger that everyone can trust. However, in addition to recording currency transaction information, this ledger can also record a variety of other information, allowing other institutions to achieve decentralized information sharing. It has been applied in the following fields.

Prevent product counterfeiting: Manufacturers can attach a QR code to each product and record the QR code number in the blockchain, which can then record product circulation information and help consumers track whether the product comes from a reliable manufacturer and is genuine. Currently, the counterfeiting situation in the pharmaceutical production industry is becoming increasingly serious, endangering the health of patients, and such a blockchain solution is urgently needed.

Preventing falsification of logistics information: Many companies with large and complex supply chains also face the problem of information falsification. They can track the logistics information of suppliers by building private chains. The owner of the private chain has the right to decide the participants of the blockchain, and the central enterprise in the supply chain can set different permissions for each supplier in the private chain. For multi-level supply chains where goods flow from small suppliers to medium-sized suppliers, then to large suppliers, and finally to manufacturers, blockchain can help optimize the management of the entire process. In such a multi-level supply chain, a slight mistake on the small supplier side will cause losses to the manufacturer, but blockchain technology can make the information in the entire process open and transparent, making it convenient for all participants to find and solve problems in a timely manner. Wanxiang Blockchain's supply chain financial service platform is a typical application case.

Promote collaboration: Auto insurance claims usually require multiple insurance companies to share data and collaborate to solve them. Using blockchain to manage relevant information and data can allow these insurance companies to trust the authenticity of the data and information on the chain without having to spend manpower to check and verify data and information, thereby reducing labor costs for insurance companies, while improving claims processing efficiency and increasing car owner satisfaction.

Blockchain business challenges and opportunities

In recent years, the concept of blockchain has been very popular, with a lot of exaggeration. The most important thing for enterprises is to consider whether they have the ability to use blockchain well.

In addition, who will pay for the investment in blockchain is also a question. Enterprises will definitely have such concerns: Why should I spend money to build a blockchain to facilitate win-win cooperation with other companies in the industry? I spend money, but the benefits are divided among everyone. This reflects the advantages of private chains and alliance chains. The party that spends money to build a private chain or alliance chain has the right to manage the blockchain and ensure its own maximum benefits.

Despite the difficulties, the commercial value of blockchain is still considerable. The characteristic of blockchain is that it allows people or companies that do not trust each other or are even competitors to exchange information with confidence. Therefore, it is necessary to find the problems caused by the poor information exchange in business, prescribe the right medicine, and use blockchain to solve them, so that the participants can get what they need and maximize the interests of all parties.

Reference articles:

The Bitcoin Blockchain Explained

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af

End

Source: Wanxiang Blockchain

<<:  Research: When is the best time of year to buy BTC to make money?

>>:  There are more than 8,000 Bitcoin ATMs worldwide, 76% of which are in the United States

Recommend

Which women with moles are prone to emotional problems?

In mole physiognomy, the moles on a person’s body...

Back to school: Blockchain education network's global Bitcoin airdrop

Baozou Shizhao Comment : "Bitcoin Airdrop&qu...

What does it mean when there are multiple vertical lines on the love line?

Most people have a love line on their hands, whic...

Bitcoin ETF: Canadians invest $150 million in one month

Canadians are investing a record amount of money ...

The size of your butt can tell you how wealthy you are

The size of your butt can tell you how wealthy yo...

What does a mole on the lifeline mean?

A person's lifeline represents how long that ...

Will people with sunken and weak eyes be happy in their later years?

After working hard for most of his life, doesn...

What does a woman with a mole under her armpit look like?

Moles are very common on our body, and everyone h...

A woman with money to spend

Reading faces is an academic discipline that has ...

How to tell IQ from palm lines

Palmistry is a profound academic discipline. The ...

What kind of palm lines do women have?

Observe a woman's fortune from her fingers 1....