Induction and summary of basic knowledge of blockchain

Blockchain

Based on the literature that bloggers have read or consulted, this blog post will introduce the relevant knowledge points of blockchain (Blockchain), as well as summarize and summarize. This is also the blogger's personal learning process. It is updated for a long time. It is recommended to collect it, and corrections are welcome!

Blockchain explained in one sentence :A distributed accounting system based on cryptographic algorithms, consensus mechanisms, point-to-point transmission, mathematics, computer programming and other technologies

1. The Birth and Evolution of Blockchain

In 2008, a cryptographer named Satoshi Nakamoto published an article " Bitcoin: A Peer-to-Peer Electronic Cash System " (Chinese translation: Bitcoin: a peer-to-peer electronic cash system) White paper that started the era of Bitcoin (BTC).

On January 3, 2009, the first genesis block with serial number 0 was born. A week later, on January 9, a block with serial number 1 appeared, which marked the birth of the blockchain.

2. Explanation of terms related to blockchain

  • 1) Satoshi Nakamoto : The founder of Bitcoin, whose real identity is unknown so far. Some people say that they are Americans, and they will control the world after they issue Bitcoin; some people say that they are Japanese, because Satoshi Nakamoto is more like a Japanese name; some people say that they are Chinese, because it can be understood as " Chinese people are inherently smart . ".
  • 2) Block : In the blockchain network, counterfeiting will be packaged together in the form of multiple files, similar to putting these files into a box, so it is also called counterfeiting block.
  • 3) Chain : The blocks are sorted in chronological order and formed by concatenating the hash values ​​between the previous block and the next block. It is not a real chain, but a metaphor.

insert image description here

  • 4) Block Header and Block Body: the index fake block is divided into two parts: the block header and the block body. The block header stores the hash value of the previous block and the current block . The hash value, nonce, timestamp, and Merkle root of the block, while the block body stores all the real data.
  • 5) Hash value (Hash Value): refers to the "data fingerprint" obtained by a hash function (also known as hash function, digital digest) through a short random string representing an input message of any length.

insert image description here

  • 6) Random number (Nonce): a one-time random number automatically generated by the system, used to solve mathematical problems, and the random number will be regenerated each time it is solved.
  • 7) Timestamp : refers to the character sequence that exists in the block from the moment the block is generated, and is used to mark the transaction time of this data. It is generally stored in the block header and is unique.
  • 8) Merkle Root : refers to the Merkle tree obtained by hashing the transaction data in the block body, also known as a hash tree, a binary tree, which is often used for Quickly check if a specific transaction exists. After the transaction is hashed, the leaf nodes are obtained, and then every two leaf nodes are hashed. Each intermediate node is the hash value of its first two child nodes, and so on, until a hash value is finally generated. This final hash is called the Merkle root, also known as the Merkle root.

insert image description here

  • 9) Node : Refers to each participant or network node in the blockchain network.
  • 10) Full Node: Refers to the node that has a complete blockchain ledger. The full node occupies a large amount of memory. It needs to synchronize the data of all blockchains, and is mainly responsible for the broadcast and verification of blockchain transactions.
  • 11) Peer -to-Peer: It means that a single node can directly interact with other nodes without intermediate nodes or intermediaries.
  • 12) Mining: It is not real mining , but refers to the process of digitally recording information using computer hardware to "solve a mathematical problem". Because its working principle is very similar to mineral mining, it is called "mining".
  • 13) Mining Difficulty : is a measure of the difficulty of recording information onto a digital record called a blockchain. During the Bitcoin consensus process, in order to maintain the block generation speed at 10 minutes, the generated mining difficulty will be adjusted regularly.
  • 14) Miner : refers to the network node in the blockchain network that continuously performs hash operations to solve mathematical problems and generate proof of work.
  • 15) Block Height: The height of a block refers to the number of blocks between it and the genesis block in the blockchain. For example, a block height of 100 means that there are 100 blocks between the block and the genesis block.
  • 16) Genesis Block: refers to the first block in the blockchain system, called the "Genesis" block, which is generally used for initialization without transaction information. For example, in the Bitcoin system, the genesis block was created by Satoshi Nakamoto.
  • 17) Distributed : Implemented through the P2P technology of the blockchain, it describes a complete copy of a system that is run and maintained on multiple computers at the same time, without any person or organization of the system.
  • 18) Ledger : It refers to the data structure of the blockchain and a recording state of all transaction information, which is similar to bookkeeping, so it is called "ledger".
  • 19) 51% attack (51% attack): In the Bitcoin system, when the computing power advantage of the system exceeds half of all the system (>50%, ie 51%), you can tamper with or revoke your own payment records, so It can create blocks faster than other nodes, which is not conducive to system stability.
  • 20) Double Spending: It means that after a node with a large amount of computing power sends a transaction, when the funds are not confirmed in time, another transaction is sent and the same currency is sent to other nodes. (a money spent twice)

3. Classification of blockchain

insert image description here

  • 1) Public Blockchain: Completely decentralized, any node can access it, everyone can participate in the calculation in the blockchain, and anyone can download the complete blockchain ledger. Networks such as Bitcoin and Ethereum are all public chains. It is characterized by privacy protection and system inefficiency.
  • 2) Consortium Blockchain: Semi-centralized, the permissions of each node participating are completely equal, and each node conducts data interaction and trusted exchange in the case of complete distrust. Each node of the alliance chain can only join the network after authorization. For example, Hyperledger Fabric, R3 Alliance, etc. It is characterized by self-endorsement and high system efficiency.
  • 3) Private Blockchain: Centralization, in some blockchain application scenarios, developers do not want anyone to participate in the system, so build a private area where only licensed nodes can participate and see all data blockchain. For example, private institutions, internal enterprises, etc. It is characterized by collective endorsement and high system efficiency.

Fourth, the hierarchical structure of the blockchain

insert image description here

  • 1) Data Layer: It mainly describes the physical form of the blockchain system, which is the chain structure of the blockchain starting from the genesis block, including block data, random numbers, timestamps, and public and private keys. Etc. data is the lowest data structure in the entire blockchain technology.
  • 2) Network Layer: It mainly realizes the mechanism of distributed network through P2P technology, including P2P networking mechanism, data dissemination mechanism and data verification mechanism.
  • 3) Consensus Layer: Contains consensus algorithms and consensus mechanisms, enabling highly dispersed nodes to efficiently reach consensus on block data in a decentralized blockchain network, and is one of the key technologies of blockchain .
  • 4) Actrator Layer : It mainly includes the issuance system and distribution system of economic incentives. Its function is to provide certain incentives, encourage nodes to participate in the verification work in the blockchain, and incorporate economic factors into the blockchain technology. in the system.
  • 5) Contract Layer: It mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which are the basis of blockchain programmability.
  • 6) Application Layer: Encapsulates various application scenarios and cases, similar to applications on computer operating systems.

5. References

  1. Blockchain Industry Dictionary.pdf
  2. Yuan Yong, Wang Feiyue. Current Situation and Prospects of Blockchain Technology Development. Journal of Automation, 2016, 42(4): 481-494.

Guess you like

Origin blog.csdn.net/A33280000f/article/details/118306549