Blockchain technology principles and applications

1.Gu 块链Technical Summary

1.1 What is blockchain technology

Blockchain technology, also known as "distributed ledger" technology, is considered the latest way to ensure the security of data storage and movement - it does not store data in a centralized place, but " "Broken into parts" and then stored on thousands of nodes in the global Internet network, and a powerful encryption technology is used to lock the data together to ensure the integrity and security of the data.

The essence of blockchain is a technical system composed of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, smart contract and other technologies. These technologies are combined in new ways to achieve tamper-proof data storage, traceable data viewing, and trustworthy point-to-point transmission, which can solve the long-standing trust-building problem.

1.2 Blockchain development history

On November 1, 2008, Satoshi Nakamoto proposed the concept of Bitcoin (Bitcoin), and it was officially born on January 3, 2009. The original intention of Bitcoin was to make digital currency payments in a trustless environment, through hashing. Functions, asymmetric encryption, signatures and other cryptographic methods are used to achieve user anonymity and transaction confirmation, and to reach an agreement on jointly maintained data through a consensus mechanism, proposing a new solution to the trust crisis. Since the advent of Bitcoin, Bitcoin The underlying technology of the currency - blockchain technology is also constantly developing. The current development of blockchain can be divided into four stages.

(1) Blockchain 1.0 (digital application represented by BT)

The blockchain 1.0 era has witnessed the iteration of the entire concept of decentralization, all centered around the evolution of cryptocurrency. The initial emergence of blockchain began with the birth and development of the first cryptocurrency, Bitcoin. At this stage, blockchain is centered around highly secure, anonymous, peer-to-peer transactions in a fully decentralized digital currency.

(2) Blockchain 2.0 (application in financial field)

As the next generation of blockchain technology after Blockchain 1.0, Blockchain 2.0 is obviously an upgraded version of Blockchain 1.0 represented by Ethereum. Blockchain 2.0 basically focuses on the rise of Ethereum and the integration of smart contracts. Ethereum has been built as a means for building decentralized applications. Therefore, Blockchain 2.0 is centered around it as it provides greater avenues for developers to deploy smart contracts to the Ethereum blockchain in an open source and permissionless manner. This technology has given rise to innovations in decentralized finance (decentralized finance), decentralized autonomous organizations (DAOs), initial coin offerings (ICOs), and non-fungible tokens (NFTs). Overall, Blockchain 2.0 can be defined as the second generation of blockchain technology focused on smart contracts.

(3) Blockchain 3.0

This is a stage in blockchain evolution designed to improve scalability features while allowing blockchains to interact with each other. Blockchain 3.0 attempts to introduce Cardano (ADA) to the scene. Although there is no clear definition or certain opinion about its promise to the Internet, the blockchain is believed to employ a proof-of-stake (PoS) mechanism. However, its potential is focused on creating solutions for services and industries outside the economy. Blockchain 3.0 is considered enterprise and institutional blockchain. It aims to reduce the high gas fees imposed by previous versions while also enhancing the blockchain’s security features. 3.0 transcends the fields of currency, finance, and even business, extending to all fields and penetrating into all aspects of our lives, including politics, social interaction, education, medical care, etc.

(4) Blockchain 4.0 (new generation technology)

Blockchain 4.0 is a new generation of blockchain technology following Blockchain 3.0. It aims to enable blockchain to eventually be used in business settings to create and run applications, making the technology fully mainstream. Focus on innovation. Speed, user experience and 04 usability will be the focus areas of Blockchain 4.0. It can divide blockchain 4.0 applications into two vertical areas: Web3.0 and Metaverse.

 

2. Principles of blockchain technology

Blockchain is a decentralized distributed accounting mechanism. The operating principle is a process in which people reach consensus and trust each other on the Internet. The essence of the blockchain is a big ledger that everyone can participate in accounting. Everyone also has a small ledger that can back up all the data in the big ledger. When a transaction data is completed, someone will process the data. Then synchronize it to everyone's small ledger for everyone to confirm. Most of them think this data is real and credible. This data will be recorded in the ledger of the entire blockchain network. Everyone then synchronizes and updates the new data. The advantage of this mechanism is that it solves the trust problem. Like social networking and shopping now. The data is all in the hands of centralized giants. Once they change our data, we have no way of knowing. But in the world of blockchain, as long as someone wants to change the data, it will conflict with the data recorded in other small ledgers. Will be discovered soon. This ensures data security and trust issues. That is, it is a process in which everyone keeps accounts together, verifies each other, and reaches consensus. The following is a detailed introduction to the operating principle of blockchain.

Blockchain is a distributed ledger that is open to anyone.

Distributed ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they can all participate in supervising the legality of the transaction and can also jointly testify for it. Once the data is recorded in the blockchain, it will be difficult to modify it in the future. How is this done? Let’s first understand the composition of blocks.

2.1ward composition

Each data block contains three elements.

 They are: Data, Hash value, Hash value of the previous block.

Data

The data stored in a block depends on the type of block. For example: Bitcoin’s blockchain records the details of transactions. Such as sender, receiver, number of coins.

 Hash value

Each block itself has a hash value, which is unique, just like everyone has their own unique fingerprint. It is used to identify a block and the contents of the block. When a data block is produced, its hash value is also calculated.

A block contains two hash values: "the hash value of the previous block" and "the hash value of this block". Because each block contains the hash value of the previous block, all blocks are connected in sequence into a (logical) chain. The "hash value of the previous block" plays the role of "page number" - sorting the pages.

If the transaction information on a block is maliciously tampered with, the "hash value of this block" will change. Since the next block in the blockchain contains the "hash value of the previous block", in order for the next block to still be connected to this block, the next block needs to be modified. And this in turn causes the next, next, next... block to also have to be modified.

2.2Blockchain operation steps

1. The sending node broadcasts the new data record to the entire network.

2. The receiving node carefully verifies the received data record information. If the recorded information is legal, after passing the verification, the data record will be included in a block.

3. All accepting nodes in the entire network execute consensus algorithms on blocks, including proof of work, proof of equity, etc.

4. After the block passes the consensus algorithm process, it is officially included in the blockchain for storage. All nodes in the network indicate that they accept the block, and the new block will be extended based on the blockchain.

                                                           

Network-wide broadcast does not actually need to be received by all nodes in the entire network, as long as most nodes receive it. For those blocks that have not been received or lost, the blockchain system is fault-tolerant. If a node does not receive a specific block, when the node finds that it is missing a block, it can make a request to download the block.

Nodes always consider the longest blockchain to be the correct chain and continue to verify and extend it based on this. When one of them proves to be longer, then the nodes working on the other branch chain will switch camps and start on the longer chain.

2.3moreSpecial testExample analysis area 块链的Target workProcess

As shown in Figure 3-3, a transfer transaction occurs between node A and node B. Node A first broadcasts its transaction to all nodes in the network. After receiving the transaction request, the node verifies the signature of node A. After the verification is passed, it will take a period of time. The transactions received within the block form a new block. Each node (miner) competes for computing power through Proof of Work (PoW) to obtain the accounting rights of the new block. After the node obtains the accounting rights, it publishes the block to In the network, other nodes check the correctness of the block and transaction after listening to the new block. If the new block meets the requirements, the new block will be saved locally and linked with the previous block to form a blockchain, and at the same time, it will be used as a resource for miners to consume. Compensation for computing, electricity and other resources, miners who obtain accounting rights will receive a certain number of Bitcoins (6.25 Bitcoins from 2020 to 2024) and transaction fees as rewards.

 

                                                   

2.4 Core technology of blockchain

Use blockchain data structures to verify and store data, use distributed node consensus algorithms to generate and update data, use cryptography to ensure the security of data transmission and access, and use smart contracts composed of automated script codes.

A new distributed infrastructure and computing paradigm for programming and manipulating data. The object of blockchain technology operation is data, which is a way of processing data.

(1) Block chain data structure

The blocks storing data information are connected in a chronological order to form a chain. Each block has a corresponding hash value 0. Each block contains the hash value of the previous block to ensure that the data of the previous block cannot be tampered with. A "chain" is composed of "blocks".

 

Chart 2-4-1 Block chain data structure

(2) Distributed node consensus algorithm

Each block will have many distributed nodes (smart devices that can be connected to the blockchain network). The data of each node is recorded and stored independently. Data that has been jointly verified by nodes will be stored permanently after being stored on the blockchain.

 

Chart 2-4-2 Distributed node consensus algorithm

The distributed system of blockchain has the advantage of natural data protection. If a node intends to tamper with the data that has been uploaded to the chain, it will need to control more than 51% of the nodes in the system at the same time. This is almost impossible for widely distributed nodes. of.

(3) Cryptography

Each block is encrypted by the SHA256 algorithm to generate a unique hash value. Any changes to a certain block on the chain will cause the hash value of the block to change, which will in turn cause the hash value of subsequent blocks to change, making it inconsistent with the data recorded and stored by the original node, so it is extremely difficult to tamper with. high.

 

Chart 2-4-3 Cryptography

(4) Smart contract

A computer transaction protocol that executes contract terms, that is, a piece of contract code written on the blockchain. Once an event triggers the terms in the contract, the code of the smart contract is automatically executed.

 

                                                               

An agreement recorded on the blockchain does not require human control, is executed automatically, the execution process is traceable and irreversible, automatically supervised and arbitrated, cannot be modified, cannot be intervened, is open and transparent, and can be viewed by anyone.

In general, blockchain is an application model for data transmission, which is composed of these four technologies. It is like blockchain is a high-rise building, and technology is the material to build this high-rise building. It is precisely because of these Technology serves as the foundation and solves one problem after another, and only then can we have the broad prospects of blockchain.

Guess you like

Origin blog.csdn.net/weixin_52734253/article/details/130714465