区块链 数据层,区块链数据层 网络层
区块链是一种分布式数据库技术,它是一种能够记录和存储数据的分布式存储技术。它由两个主要部分组成:数据层和网络层。
数据层是区块链技术的核心,它是一种记录和存储数据的数据库,它能够存储大量有效的数据。数据层的主要功能是记录和存储区块链中的所有数据,包括交易数据、账户数据、智能合约数据等。数据层是区块链的基础,它是区块链系统的核心部分,它的安全性和可靠性是区块链系统的关键。
网络层是区块链技术的另一个重要部分,它是一种分布式网络技术,它能够实现数据的分布式存储和传输。网络层主要用于实现数据的可靠传输,它能够保证数据在网络中的安全传输。网络层的主要功能是实现数据的分布式存储和传输,它能够保证数据在网络中的安全传输。
总之,区块链技术是一种分布式数据库技术,由数据层和网络层组成,它能够记录和存储大量有效的数据,并且能够实现数据的可靠传输。区块链技术的安全性和可靠性是其重要的优势,它已经成为当今世界的重要技术之一,可以用于解决各种现实问题。
请查看相关英文文档
Ⅰ What is blockchain and how to explain it
1. P2P is very popular now, and when it comes to P2P, Bitcoin has to be mentioned. As for Bitcoin, it has an important concept, which is blockchain.
2. What is blockchain? Blockchain is actually equivalent to a disintermediated database, which is composed of a series of data blocks. Each of its data blocks contains information about a Bitcoin network transaction, which is used to verify the validity of the information and generate the next block. In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-forgeable. Ledger. In a broad sense, blockchain is actually a distributed infrastructure and computing method that is used to ensure the security of data transmission and access.
3. The infrastructure of blockchain The blockchain is composed of six infrastructures: data layer, network layer, consensus layer, incentive layer, contract layer and application layer.
4. Purpose of blockchain Blockchain is mainly used to solve trust and security issues in transactions.
II What components should the DAC chain have
Technical level, the structure of the blockchain. There are multiple blocks on a blockchain, and each block includes a block header and a block body. The block header mainly includes the version number, the hash value of the previous block, timestamp, random number, target hash, and Merkle root; the block body contains the ledger information recorded through the Merkle tree. This mainly shows the technical architecture of the blockchain principle. Next, it mainly introduces the organizational structure and levels. When blockchain technology was first proposed, the architecture was usually divided into six layers, namely data layer, network layer, consensus layer, incentive layer, contract layer and application layer, which was the early architecture diagram of blockchain technology.
Data layer: The data layer is the basic layer, whose function is to collect, record and store urban public safety big data. The block header encapsulates information such as timestamp, root hash value, version number, proof of work, etc. The block body contains public security transaction records calculated using hash algorithm, Merkle tree, asymmetric encryption and other technologies. The password of this layer Learning technologies and operating rules can ensure the security and integrity of public safety big data.
Network layer: As a working mechanism layer, the network layer allows governance entities to jointly participate in the dissemination, verification and accounting of data blocks, and maintains the update and maintenance of public safety big data.
Consensus layer: The consensus layer mainly includes various consensus algorithms, aiming to allow government departments, private units, the public and other governance entities to reach consensus and establish a trust network in the distributed system, thereby maintaining the effectiveness of public security big data. sex.
Incentive layer: The function of the incentive layer is that each consensus subject can receive corresponding incentives in the process of collectively maintaining the blockchain system, so that each subject can not only safeguard its own interests, but also ensure the validity and timing of the blockchain data. sex.
Contract layer: The contract layer needs to be designed in the national institutional environment. Its smart contract is a computer digital protocol that each subject has always followed. Contract rules can be formulated based on the logic and process of governance, and public safety data records can be spontaneously recorded. , storage, and sharing, thereby effectively reducing governance costs and improving governance efficiency.
Application layer: The application layer can design public chain and alliance chain networks based on the degree of decentralization and governance entities for ordinary government systems and non-governmental systems, and private chains for government confidential systems, and users can access them based on the network The entrance provides diversified services and truly realizes the co-construction and sharing of data.
Target layer: The target layer is the target task of our management.
In addition, it also includes the application layer, incentive layer, consensus layer, network layer, and data layer. They are nothing more than simplifications in the appeal architecture, and will not be introduced in detail here.
III What are the blockchain technologies?
The concept of blockchain can be said to be very popular. At the Internet Finance Summit, no one said that blockchain technology is out. What is chain technology?
Blockchain technology can be either a public classification (anyone can see it) or a permissioned network (only permissioned people can see it), solving supply chain challenges. Because it is An immutable record, so it is shared among network participants and updated in real time.
Blockchain technology - data layer: Designing the data structure of the account book
Core technology 1. Block_ _;Chain:
Technically, a block is a data structure that records transactions, reflecting the capital flow of the transaction. The transaction blocks that have been reached in the system are connected to form the main chain, and all nodes participating in the calculation are It records the main chain or a part of the main chain.
Each block is composed of a block header and a block body. The block body is only responsible for recording all transaction information in the previous period, mainly including transaction quantity and transaction details. The block header includes The current version number, the previous block address, the timestamp (recording the time when the block was generated, accurate to the second), the random number (recording the answer value to the mathematical question related to decrypting the block), the target hash value of the current block, and the Merkle number Information such as the root value of the source mill. From a structural point of view, most functions of the blockchain are implemented by the block header.
Core technology 2. Hash function:
.
The hash function can convert data of any length from the Hash algorithm to a fixed-length code. The principle is a one-way hash function based on cryptography. This function is easy to verify, but difficult to interpret. The industry usually uses y =hash(x) means that this hash function realizes the hash value y of computing x.
Commonly used hash algorithms include MD5, SHA-1, SHA-256, SHA-384, SHA-512, etc. Taking the SHA256 algorithm as an example, input any data into SHA256 and you will get a 256-bit Hash value (hash value). Its characteristics: the same data input will get the same result. Enter the dataA slight change (for example, 1 becomes 0) will get a completely different result. The result is measured. The forward calculation (the Hash value corresponding to the data calculation) is very simple. The reverse calculation is extremely difficult and is considered impossible under current scientific and technological conditions. Possibly.
Core technology 3. Merkle tree:
Merkle tree is a hash binary tree, which can quickly verify the integrity of large-scale data. In the blockchain network, Merkle_ Huangli Living in Mi Mi Fu Zheng, the oars and weapons are by the side of Hui Zai_钪 Zhang incited the oars by the side of Hui Zai ⒌ Nai Cheng also V carries the smell of oars and fish Wei said that by the side of Hui Zai ⒌ Seeking for the purpose of Xi Ji Min_erkle Trees.
< p>Core Technology 4. Asymmetric Encryption Algorithm:Asymmetric encryption algorithm is a key secret method that requires a key and a key. The public key and the private key are a pair. If the public key is used to encrypt data, only It can be decrypted with the corresponding private key to obtain the corresponding data value. If the private key is used to sign the data, the signature can only be verified with the corresponding public key. The sender of the verification information is the owner of the private key.
Since two different keys are used for encryption and decryption, the algorithm is called an asymmetric encryption algorithm, while symmetric encryption uses the same key during encryption and decryption.
Blockchain Mitigation Technology - Network Layer: realize the centralization of charging nodes
Core technology 5, P2P network:
P2P network (peer-to-peer network) is also called point-to-point technology. It has no central server and user group exchange. Information Internet system. Different from the central network system with a central server, each client of the peer-to-peer network is a node and also has the function of a server. The domestic Thunder software uses P2P technology. The P2P network has the characteristics of centralization and reinforcement.< /p>
Blockchain technology-consensus layer: allocating the task load of charging nodes
IV What are the classifications of blockchains and what is the structure of the blockchain
The concept of blockchain has been quite popular recently. It comes from the implementation of cryptocurrencies such as Bitcoin, but now this technology has been gradually used in various fields. So do you know what the classifications of blockchain are? What is the structure of blockchain? Let’s follow us to find out more.
What are the classifications of blockchain?
1. Public Blockchains (PublicBlockChains)
Public Blockchain means: any individual or group in the world can send transactions, and the transactions can be effectively confirmed by the blockchain, and anyone can participate its consensus process. The public blockchain is the earliest blockchain, and it is also the most widely used blockchain at present. The virtual digital currencies of all major bitcoins series are based on the public blockchain. There is one and only one corresponding to this currency in the world. Blockchain.
2. Consortium (Industry) Blockchain (ConsortiumBlockChains)
Industry Blockchain: Multiple preselected nodes are designated within a certain group as bookkeepers, and the generation of each block is jointly performed by all preselected nodes. Decide(Pre-selected nodes participate in the consensus process), other access nodes can participate in transactions, but do not participate in the accounting process (it is essentially still managed accounting, but becomes distributed accounting, how many slag points are pre-selected, and how to determine each The bookkeeper of the block becomes the main risk point of the blockchain), and anyone else can conduct limited queries through the open API of the blockchain.
3. Private Blockchain (privateBlockChains)
Private Blockchain: Only uses the general ledger technology of the blockchain for accounting. It can be a company or an individual, and has exclusive access to the writing of the blockchain. With access permissions, this chain is not much different from other distributed storage solutions. At present (Dec2015), conservative giants (traditional finance) want to experiment with private blockchains, while public chain applications such as Bitcoin have been industrialized, and private chain application products are still being explored.
4. Sidechain (Sidechain)
Sidechain is a blockchain used to confirm data from other blockchains. Through the two-way peg (TwoWayPeg) mechanism, various assets such as Bitcoin and Ripple coins can be Transfers are realized on different blockchains at a certain exchange rate.
What is the structure of blockchain?
1. Basic network layer: The basic network layer consists of a data layer and a network layer. The data layer includes underlying data blocks and related data encryption and timestamp technologies; the network layer includes distributed networking mechanisms, Data dissemination mechanism and data verification mechanism, etc.
2. Intermediate protocol layer: The intermediate protocol layer consists of a consensus layer, an incentive layer, and a contract layer. The consensus layer mainly includes various consensus algorithms of network nodes; the incentive layer integrates economic factors into the blockchain technology system. , mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly includes various scripts, algorithms and smart contracts, which is the basis of the programmable features of the blockchain.
3. Extension layer: This layer is similar to a computer driver and is designed to make blockchain products more practical. There are currently two categories. One is various trading markets, which are important channels for exchanging legal currency for cryptocurrency. They are simple to implement, get money quickly, and have low costs, but the risks are also high. The second is the expansion implementation in a certain direction. For example, based on the Yishu side chain, it can provide customized services for third-party publishing organizations, forum websites and other content producers.
4. Application service layer: As the most important link in the blockchain industry chain, the application service layer includes various application scenarios and cases of blockchain, including programmable currency, programmable finance and programmable society.
The above are the blockchain classifications brought to you by the editor? What is the structure of blockchain? of the entire content.
Ⅳ One article to understand the Internet blockchain
One article to understand the Internet blockchain
One article to understand the Internet blockchain. To understand the blockchain, We have to study the brief history of the technological development of blockchain starting from the birth of the Internet, discover the motivations for the emergence of blockchain, and infer from thisThe future of blockchain. Let’s understand the Internet blockchain in one article.
Understand the Internet blockchain in one article 1The originator of blockchain is mahjong, and the earliest blockchain was invented by the Chinese! The blockchain is just like Mahjong, except that Mahjong has fewer blocks. Mahjong only has 136 blocks. The rules of Mahjong vary from place to place and can be regarded as a hard fork of Bitcoin.
As the oldest blockchain project, Mahjong has a group of four miners. The first one to dig out the 13 correct hash values will get the accounting rights and rewards. It adopts the method of being willing to admit defeat and not cheating. Thousands of consensus mechanisms!
Mahjong is decentralized, everyone can be the banker, and it is completely peer-to-peer.
Mining pool = commission from the boss of the chess and card room.
It cannot be tampered with, because convincing the other three people requires too much computing power and physical strength.
A typical value Internet. The value in my pocket didn't last eight rounds before it went into their pockets.
The Chinese are basically good at playing mahjong. In terms of blockchain, they produce 70% to 80% of the world’s mining machines and have the most computing power in the world, accounting for about 77% of the computing power.
Mahjong is actually the earliest blockchain project:
1. A group of four miners. The miner who first collides with the correct hash value of 13 numbers can obtain the accounting rights. and get rewarded.
2. It cannot be tampered with. Because convincing the other three people requires too much computing power and physical strength.
3. Typical value Internet. The valuable digital currency www.gendan5.com/digitalcurrency/btc.html in my pocket ran into their pockets after eight rounds.
4. Decentralization, everyone can be a banker, it is completely peer-to-peer.
5. UTXO, unspent transaction expenses.
There is another blockchain method of credit, assuming that everyone has no cash
Let’s take a closer look. When everyone reaches a consensus, we see There is no intermediary or third party to judge whether C wins, and the rewards given to C do not need to be transferred to C through a third party. They are all direct peer-to-peer transactions. This process is decentralized, and players (miners) record their own records. After recording the results of the first game, B Dahu drew thirteen pieces, and B got Jia Dongfeng. After the record was completed, a complete block was generated, but remember, this was only the first game. In the entire blockchain , this is just one node. After the 8 rounds mentioned at the beginning, there are 8 nodes (blocks). The 8 blocks are connected together to form a complete ledger, which is the blockchain. Because everyone has one of this ledger, it is a distributed ledger. The purpose is to prevent someone from tampering with the record. At the end of the game, it is clear who wins and who loses.
Four men (A, B, C and D) gathered together to play mahjong for money. None of them brought any cash, soAsk a beautiful woman (centralized) to keep a notebook and record who won and how much money she lost in each round? At the end of the day, everyone uses Alipay or WeChat to pay and settle the ledger. However, if this beauty made a mistake in accounting or was bribed by one of the four people in advance to make a mistake on purpose, there is no guarantee that the outcome of this game will be fair, just, and reasonable. ,dont you agree? then what should we do? If you "play mahjong", you can use "blockchain" as the game rules and adapt it as follows:
Four men (A, B, C and D) got together to play mahjong for money. No one brought any cash. B said Let the beauty she brought keep accounts. A said that none of us knew this beauty, so the four of them, A, B, C, and D, agreed that everyone would keep accounts at the same time (decentralized) on their mobile phones (blockchain nodes) for each game. ), after finally playing mahjong and paying with electronic money directly on the mobile phone, everyone checked the accounting results. The accounting results should have been the same.
Assume that the original result is the account recorded on A’s mobile phone: B owes A 10 yuan. However, the record on B's mobile phone shows that there is no debt, but the other two people (C and D) have the same accounting as A, so the settlement is still based on the majority rule. In addition, everyone has a bad impression of B's integrity. Next The first time I play mahjong, I won’t take B to play with me.
Unless B bribes two people (C and D) in advance to deliberately cheat, but the cost of B bribes them is 100,000 yuan (10,000 times the default of 10 yuan), then in common sense, B only You can choose to give up because the cost of counterfeiting is too high.
Assume that even if B is secretly willing to pay a high price of 100,000 yuan to buy C and D to do this silly cat transaction with huge losses during the card game, the rules of the blockchain are to keep accounts based on timestamps. Yes, it turns out that B owed A 10 yuan when debiting the account at 1 p.m., that is, when C and D changed the account at 3 p.m., time is irreversible and they can only record 3 p.m., which does not comply with the rules of the game. .
In fact, in 2017 the blogger has developed a set of Mahjong coins
China’s earliest blockchain project: a group of four miners, first starting from 148 random numbers The miner who collides with the correct hash value of 14 numbers can obtain an accounting right incentive. Since distributed accounting requires the consensus of several other miners, each accounting transaction takes about ten minutes.
Understanding the Internet Blockchain in One Article 21. Before the birth of Bitcoin, 5 Internet technologies that will have a significant impact on the future of the blockchain
In 1969, the Internet was born in the United States. Since then, the Internet has expanded from four research institutions in the United States to the entire planet. In terms of application, it has expanded from the earliest military and scientific research to all aspects of human life. In the nearly 50 years since the birth of the Internet, five technologies have been of particularly great significance to the future development of blockchain.
1. The TCP/IP protocol born in 1974: determines the position of blockchain in the Internet technology ecosystem
In 1974, the development of the Internet took the most critical step.The first step is the official introduction of the TCP/IP protocol, the core communication technology of the Internet jointly developed by American scientists Vinton Cerf and Robert Kahn.
This protocol enables the transmission of information between different computers and even different types of networks. All computers connected to the network can communicate and interact as long as they comply with this protocol.
In layman's terms, Internet data can travel tens of thousands of kilometers to reach the computer users who need it. This is mainly because the Internet world has formed a unified information dissemination mechanism. That is to say, Internet devices follow a unified law-TCP/IP protocol when disseminating information.
Understanding the TCP/IP protocol is of great significance to mastering the Internet and blockchain. After the invention of TCP/IP in 1974, the entire Internet was between the underlying hardware devices, the intermediate network protocols and the network Addresses have always been relatively stable, but an endless stream of innovative applications are emerging at the top application layer, including news, e-commerce, social networks, QQ, WeChat, and blockchain technology.
In other words, in the technical ecology of the Internet, blockchain is a new technology at the top layer of the Internet - the application layer. Its emergence, operation and development have not affected the underlying infrastructure and communication protocols of the Internet. , is still one of the many software technologies that operates according to the TCP/IP protocol.
2. Cisco router technology born in 1984: an imitation of blockchain technology
In December 1984, Cisco was established in the United States. The founder was a professor from Stanford University. A couple, Leonard Posak, director of the computer center, and Sandy Lerner, director of the business school's computer center, designed a networking device called a "multiprotocol router" that was placed on the Internet's communication lines to help data Get from one end of the Internet to the other thousands of kilometers away accurately and quickly.
In the entire Internet hardware layer, tens of millions of routers are busy working, directing the transmission of Internet information. An important function of Cisco routers is that each router saves a complete Internet device address table. Once something happens Changes will be synchronized to tens of millions of other routers (theoretically), ensuring that each router can calculate the shortest and fastest path.
When you see the operation process of the router, you will feel very familiar. That is the important feature of the blockchain later. The significance of understanding the router lies in the important features of the blockchain. It has been implemented on the router in 1984. For the router, even if the node device is damaged or attacked by hackers, it will not affect the transmission of the entire Internet information.
3. The B/S (C/S) architecture that was born with the World Wide Web: the opponent of the blockchain and the target of attempted subversion
The World Wide Web is referred to as the Web and is divided into Web clients and server. All updated information is only modified on the web server, and thousands, tens of thousands, or even tens of millions of other clientsThe computer does not retain information and only obtains the information data when accessing the server. This structure is often referred to as the B/S architecture of the Internet, which is a centralized architecture. This architecture is also the most important architecture of the current Internet. Internet giants such as Google, Facebook, Tencent, Alibaba, and Amazon have all adopted this architecture.
Understanding the B/S architecture will be of great significance to the subsequent understanding of blockchain technology. The B/S architecture is that data is only stored in the central server, and all other computers obtain information from the server. Blockchain technology has tens of millions of computers without a center, and all data will be synchronized to all computers. This is the core of blockchain technology.
4. Peer-to-Peer Network (P2P): Blockchain The father of the chain and its technical basis
Peer-to-peer network P2P is another Internet infrastructure corresponding to C/S (B/S). Its characteristic is that multiple computers connected to each other are connected to each other. In a peer-to-peer position, there is no distinction between master and slave. A computer can be used as a server, setting shared resources for use by other computers in the network, and as a workstation.
Napster is one of the earliest P2P systems, mainly used for music resource sharing. Napster cannot be regarded as a true peer-to-peer network system. On March 14, 2000, a message was posted on the mailing list of the underground hacker site Slashdot in the United States, saying that AOL's Nullsoft department had released Gnutella, an open source Napster clone software.
In the Gnutella distributed peer-to-peer network model, each networked computer is functionally peer, serving as both a client and a server, so Gnutella is called the first true peer-to-peer network model. Network Architecture.
In the past 20 years, some Internet technology giants such as Microsoft and IBM, as well as liberals, hackers, and even criminals who infringe intellectual property rights, have continued to promote the development of peer-to-peer networks. Of course, those on the Internet want to strengthen information sharing. The idealists also put a lot of enthusiasm into peer-to-peer networks. Blockchain is a software application based on a peer-to-peer network architecture. It is a benchmark application for peer-to-peer networks trying to break out from the silence of the past.
5. Hash algorithm: the key to generating Bitcoin and tokens (tokens)
The hash algorithm converts numbers of any length into fixed-length values using a hash function. Algorithms, famous hash functions such as: MD4, MD5, SHS, etc. It is a member of the family of cryptographic functions defined by the American National Institute of Standards and Technology.
This family of algorithms is crucial to the functioning of the entire world. From Internet application stores, emails, anti-virus software, to browsers, etc., all of them are using secure hashing algorithms. It can determine whether Internet users have downloaded what they want, and it can also determine whether Internet users are involved in man-in-the-middle attacks or network attacks. Victim of a phishing attack.
Blockchain and its application The process of generating new coins from Bitcoin or other virtual currencies is to use the function of the hash algorithm to perform operations to obtain numbers that meet the format requirements, and then the blockchain program gives Bitcoin rewards .
Mining, including Bitcoin and tokens, is actually a small mathematical game built with a hash algorithm. However, because of the fierce competition, people all over the world used powerful servers to perform calculations in order to get the rewards first. As a result, many computers on the Internet participated in this little mathematical game, which even consumed more than 40% of the electricity in some countries.
2. The birth and technical core of blockchain
The birth of blockchain should be the most unusual and mysterious invention and technology in the history of human science, because in addition to blockchain, to So far, there is no major invention in the history of modern science whose inventor cannot be found.
On October 31, 2008, Bitcoin founder Satoshi Nakamoto (pseudonym) published a paper on the cryptography mailing group - "Bitcoin: A Peer-to-Peer Electronic Cash System". In this paper, the author claims to have invented a new electronic currency system that is not controlled by governments or institutions. Blockchain technology is the basis for supporting the operation of Bitcoin.
The preprint address of the paper is at http://www.bitcoin.org/bitcoin.pdf. From an academic point of view, this paper is far from a qualified paper. The main body of the article is composed of 8 flow charts. It is composed of corresponding explanatory text, no nouns and terms are defined, and the format of the paper is also very irregular.
In January 2009, Satoshi Nakamoto released an application case of blockchain on the SourceForge website - the open source software of the Bitcoin system. After the release of the open source software, it is said that Satoshi Nakamoto mined approximately 1 million bits. Coin. A week later, Satoshi Nakamoto sent 10 Bitcoins to cryptography expert Hal Finney, which became the first transaction in Bitcoin history. With the booming development of Bitcoin, research on blockchain technology has also begun to show explosive growth.
It is indeed difficult to fully and clearly explain the blockchain to the public. We use Bitcoin as the object to introduce the technical characteristics of the blockchain as simply as possible but in depth.
1. Blockchain is a peer-to-peer network (P2P) software application
As we mentioned before, at the beginning of the 21st century, the Internet formed two major types of applications. Architecture, centralized B/S architecture and non-centered peer-to-peer (P2P) architecture. Many Internet giants such as Alibaba, Sina, Amazon, etc. all have centralized B/S architecture. Simply put, it is data Put it in a giant server, and our ordinary users can access the servers of Alibaba, Sina and other websites through mobile phones and personal computers.
Since the beginning of the 21st century, there have been many software applications for freely sharing music, videos, and paper materials. Most of them use peer-to-peer networks.(P2P) architecture means that there is no central server. Everyone’s personal computers are both servers and clients, with equal status. However, this type of application has never become popular. The main reasons are large resource consumption and intellectual copyright issues. Blockchain is a software application in this field.
2. Blockchain is a peer-to-peer network (P2P) software application that synchronizes information across the entire network
Peer-to-peer networks also have many application methods. In many cases, everyone is not required to Each computer keeps the same information. Everyone only stores the information they need, and downloads it to other computers when needed.
However, in order to support Bitcoin financial transactions, the blockchain requires that every transaction that occurs must be written into historical transaction records and change information be sent to all computers with Bitcoin programs installed. Every computer with Bitcoin software installed maintains the latest and complete Bitcoin historical transaction information.
The characteristics of blockchain's network-wide synchronization and network-wide backup are often referred to as blockchain information security, and the source cannot be changed. Although it is still not absolutely safe in practice, when the number of users is very large, it does have certain security advantages in preventing information tampering.
3. Blockchain is a peer-to-peer (P2P) software application that uses a hash algorithm to generate "tokens" to synchronize information across the entire network
Area The first application of the blockchain was the famous Bitcoin. When discussing Bitcoin, a term that is often mentioned is "mining". So what exactly is mining?
The metaphor is that the blockchain program gives the miners (players) 256 coins, numbered 1, 2, 3...256. Each time a Hash operation is performed, it is like tossing a coin. 256 coins are thrown at the same time. After landing, if all the coins with the first 70 numbers happen to be heads. The miner can tell the blockchain program this number, and the blockchain will reward the miner with 50 Bitcoins.
From the perspective of software programs, Bitcoin mining is a mathematical game built using the hash SHA256 function. The blockchain first stipulates a winning mode in this small game: a 256-bit hash number is given, but the last 70 bits of the hash number are all 0, and then the player (miner) continuously enters various numbers. Give the hash SHA256 function and see if you can use this function to get a number with 70 zeros. If you find one, the blockchain program will reward the player with 50 Bitcoins. Actual mining and rewards are more complex, but the above example expresses the core process of mining and obtaining Bitcoin.
When Bitcoin was born in 2009, each bounty was 50 Bitcoins. Ten minutes after its birth, the first batch of 50 Bitcoins was generated, and the total currency amount at this time was 50. Subsequently, Bitcoin increased at a rate of about 50 every 10 minutes. When the total amount reaches 10.5 million (50% of 21 million), the bounty is halved to 25. When the total amountWhen it reaches 15.75 million (the new output is 5.25 million, which is 50% of 1050), the bounty is further halved to 12.5. According to the design of the Bitcoin program, the total number of Bitcoins is 21 million.
From the above introduction, Bitcoin can be seen as a guessing game based on a peer-to-peer network architecture. The Bitcoin information rewarded for each correct guess will be transmitted to all players and recorded. into each player's history database.
4. Smart contracts, tokens, ICOs and blockchain basic platforms generated by blockchain technology due to the rise of Bitcoin
From the above introduction, Bitcoin technology It is not a new technology falling from the sky, but a clever combination of various original Internet technologies, such as peer-to-peer network architecture, network-wide synchronization of routing, and network security encryption technology. It can be regarded as a combination of innovative algorithm games. .
Because Bitcoin can be exchanged for legal currency, purchased in kind, and made huge profits through appreciation, the whole world is not calm. With the attitude that if you can do it, I can do it, many people have created their own imitation Bitcoin software applications. At the same time, taking advantage of the difficulty for the government to regulate peer-to-peer networks, various altcoins exploded together with Bitcoin. There have been many incidents of fraud and absconding, which have gradually attracted the attention of governments around the world.
Blockchain basic platform: It is still quite technically difficult to create currency using the blockchain technology framework. At this time, basic technology platforms such as Ethereum, the blockchain basic platform, have emerged, making it convenient for ordinary people. Create a "Bitcoin"-like software program, each showing its magical powers, inviting people to join the game to mine coins, speculate on coins, and gain profits from it.
Pass or token: If each "Bitcoin" or "Altcoin" uses a hash algorithm to create a guessing game and generates its own "currency", this "currency" is collectively referred to as " "Certificate" or "Token".
ICO: Since Bitcoin and Ethereum have been exchanged with the legal currencies of various countries, when other new virtual currencies are issued, only Bitcoin and Ethereum are allowed to purchase the new issued coins. This process of issuing coins It’s called ICO. The emergence of ICO has amplified the transaction volume of Bitcoin and Ethereum. At the same time, many ICO projects are completely based on nihilistic projects, resulting in a large number of frequent fraud cases. This further deepens society’s negative understanding of virtual currencies generated by blockchain.
Smart contract: It can be seen as a software function on the blockchain. It is a program that assists various virtual currency transactions on the blockchain. The specific function is like the fund custody of Alipay on Taobao. When a user receives goods and confirms them on Alipay, the funds are automatically paid to the buyer and owner. Smart contracts also assume this intermediary payment function in blockchain applications such as Bitcoin.
3. The historical status and future prospects of blockchain technology in the Internet
1. Where does blockchain stand in Internet technology? It is a new software and architecture at the top level.
Our previous introduction to TCP/IPIt is mentioned in that blockchain, like browsers, QQ, WeChat, online game software, mobile APPs, etc., is a software form at the top layer of the Internet - the application layer. Its operation still relies on the TCP/IP architecture system to transmit data. But unlike most application layer software, it does not adopt the central software architecture of C/S (B/S). Instead, an unusual peer-to-peer network architecture is adopted. From this point of view, blockchain cannot subvert the Internet infrastructure.
2. Who does blockchain want to subvert? Want to subvert the B/S (C/S) structure of the World Wide Web.
It attempts to subvert the B/S, C/S structure of the World Wide Web, which was born in 1989. Said before. Since 1989, European physicist Tim Berners-Lee invented the World Wide Web and gave up applying for a patent. In the past nearly 30 years, companies including Google, Amazon, Facebook, Alibaba, Internet, Tencent and other companies have used the B/S (C/S) structure of the World Wide Web to grow into Internet giants.
In their headquarters, a powerful central server cluster was established to store massive amounts of data. Hundreds of millions of users obtained the data they needed from the giant servers. This also led to the emergence of cloud computing, and then the Internet giants Open up your unused central server resources to further absorb data from enterprises, governments, and individuals. Centralized Internet giants have an increasing influence on the world, countries, and Internet users.
The goal of blockchain is to try to reduce the influence of Internet giants by distributing data to each Internet user’s computer. It can be seen that the real opponent of blockchain and what it wants to subvert is the 1990 The B/S (C/S) structure born in 2007. But whether it can be subverted depends on its technical advantages and bottlenecks.
3. Technical flaws of blockchain: dilemmas caused by the pursuit of complete equality and freedom
The technical flaws of blockchain first come from its peer-to-peer network architecture. For example For example, Taobao currently has a B/S structure, and massive data is stored in the Taobao server cluster computer room. Hundreds of millions of consumers access the Taobao server website through their browsers to obtain the latest information and historical information.
If blockchain technology is used, hundreds of millions of people will retain a complete Taobao database on their personal computers or mobile phones. Every time a transaction occurs, it will be synchronized to hundreds of millions of other users. This is completely unachievable in reality. The amount of data transferred and stored is too large. It is equivalent to setting up and running hundreds of millions of Taobao websites at the same time.
Therefore, blockchain cannot be applied to projects with large amounts of data, and even smaller website projects will have difficulty using blockchain. By 2018, Bitcoin had been running for nearly 10 years, and the accumulated transaction data had brought the entire system to collapse.
So the blockchain has adopted many alternative methods, such as establishing relay nodes and lightning nodes. These two concepts can also make people confused. In layman's terms, the blockchain will ask it for The subversive object B/S structure was studied and data services were established.The server center becomes the relay node of the blockchain and can also be accessed using a browser-like terminal. This is the lightning node of the blockchain.
This change can alleviate the technical shortcomings of the blockchain, but it does make the blockchain what it opposes, centralization. It can be seen that pure blockchain technology has major flaws due to its technical characteristics and cannot be widely used like the World Wide Web. If the technology is upgraded and some parts adopt a B/S (C/S) structure, the blockchain will become centralized. The information node no longer maintains the dream when it was born.
4. Looking at the future prospects of blockchain from the Internet brain model
We know that the Internet generally refers to the Internet that connects computer networks around the world. On this basis The development of a global Internet network covering the whole world is called the Internet, which is a network structure that is interconnected.
Since the birth of the Internet in 1969, humans have innovated in the Internet field from different directions, and there is no unified plan to build the Internet into a structure. When the wheel of time reaches 2017, with the advent of artificial intelligence, With the vigorous development of science and technology such as the Internet of Things, big data, cloud computing, robots, virtual reality, and the industrial Internet, when humans look up to see the giant systems they have created, the model and architecture of the Internet brain have become increasingly clear.
Through nearly 20 years of development, relying on the B/S and C/S structures of the World Wide Web, Tencent QQ, WeChat, Facebook, Weibo, and Twitter Amazon have developed structures similar to neuron networks. Internet devices, especially personal computers and mobile phones, map personal data and functional space on the giant's central server through the software on the device, allowing them to add friends, communicate and transfer information. Internet giants continue to optimize the software versions of hundreds of millions of terminals through software upgrades in central server clusters. In the neurological system, this is a standard central nervous system structure.
The birth of the blockchain provides another neuron model. Instead of uniformly managing neurons in the centralized services of giants, each terminal, including personal computers and personal mobile phones, becomes an independent neuron node. , retaining an independent data space and synchronizing mutual information. In the neurological system, this is a distributed neural structure with no center and multiple neural nodes.
Interestingly, these two different types of neural structures appear in the development of the nervous system. In lower organisms, blockchain-like neural structures have appeared. There are multiple ganglia with the same functions, all of which can command body activities and reactions. However, as organisms evolve, these ganglia gradually merge. When they evolve into higher In biology, the central nervous system appeared, which contains a large number of neurons that interact with each other.
4. Judgment on the future status of blockchain in the Internet
1. Understanding of Bitcoin: a guessing game based on peer-to-peer network architecture (P2P), Become independent of government regulation through clever financial and public opinion operations.""World Currency".
2. Understanding of blockchain: a peer-to-peer (P2P) software application that uses hashing algorithms to generate "tokens" to synchronize information across the entire network .
3. Blockchain has specific uses, such as large-scale election voting, large-scale gambling, financial transactions that circumvent government financial supervision, etc., and it still has irreplaceable uses.
4. More often than not, blockchain technology will rely on the B/S, C/S structure of the Internet to achieve functional expansion, but overall it is still a supplement to the existing technology of the Internet. For the current assumptions of blockchain Most of the application scenarios can be realized using B/S and C/S structures, and the efficiency can be higher and the technology can be more mature.
5. Whether it is in terms of information transfer efficiency and resources Consumption, or from the perspective of nervous system evolution, blockchain cannot become the mainstream architecture of the Internet, let alone the subversive and revolutionary of the future Internet.
6. Of course, the development of B/S and C/S structures The emerging Internet giants also have their problems, but these can be gradually solved through commercial and political methods in the future.
VI What structures does the blockchain consist of?
The blockchain is composed of A chain storage structure formed by interconnecting blocks. The block is the data element in the chain storage structure. The first block is called the genesis block.
General blocks include block headers and block body. The block header contains the identification information of each block, such as version number, hash value, timestamp, block height and other information; the block body mainly contains specific transaction data.
In a narrow sense, blockchain is a combination of data blocks that are connected sequentially in chronological order. It is a chain data structure that is cryptographically guaranteed to be an untamperable and unforgeable distributed ledger.
Broadly speaking, blockchain technology uses a block chain data structure to verify A new distributed method that stores data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data. Infrastructure and computing methods.
[Infrastructure]
Generally speaking, a blockchain system consists of a data layer, a network layer, a consensus layer, and an incentive layer. It consists of layer, contract layer and application layer. Among them, the data layer encapsulates the underlying data blocks and related basic data and basic algorithms such as data encryption and timestamps; the network layer includes distributed networking mechanism, data dissemination mechanism and data verification. mechanism, etc.; the consensus layer mainly encapsulates various consensus algorithms of network nodes; the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly encapsulates various scripts, Algorithms and smart contracts are what blockchain canThe basis of programming features; the application layer encapsulates various application scenarios and cases of the blockchain. In this model, the chain block structure based on timestamps, the consensus mechanism of distributed nodes, economic incentives based on consensus computing power, and flexible programmable smart contracts are the most representative innovations of blockchain technology.
Extended information:
[Blockchain core technology]
Blockchain mainly solves the trust and security issues of transactions, so it addresses this issue Four technological innovations:
1. Distributed ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they all Can participate in supervising the legality of transactions and can also jointly testify for them.
The uniqueness of blockchain's distributed storage is mainly reflected in two aspects: First, each node of the blockchain stores complete data according to the block chain structure. Traditional distributed storage generally stores The data is divided into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and has equal status, relying on the consensus mechanism to ensure the consistency of storage, while traditional distributed storage generally synchronizes data to other backup nodes through the central node.
No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically speaking, the accounts will not be lost unless all nodes are destroyed, thereby ensuring the security of the accounting data.
2. Asymmetric encryption and authorization technology. Transaction information stored on the blockchain is public, but account identity information is highly encrypted and can only be accessed with authorization from the data owner. , thus ensuring data security and personal privacy.
3. The consensus mechanism is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.
The consensus mechanism of the blockchain has the characteristics of "the minority obeys the majority" and "everyone is equal". "The minority obeys the majority" does not entirely refer to the number of nodes, but can also be the computing power and the number of shares. Or other characteristic quantities that the computer can compare. "Everyone is equal" means that when a node meets the conditions, all nodes have the right to give priority to the consensus result, which will be directly recognized by other nodes and may eventually become the final consensus result.
4. Smart contracts. Smart contracts are based on these trustworthy and non-tamperable data and can automatically execute some predefined rules and terms. Take insurance as an example. If everyone's information (including medical information and risk occurrence information) is true and trustworthy, it will be easy to automate claims settlement in some standardized insurance products.
In the daily business of insurance companies, although transactions are not like those in the banking and securities industriesThat often happens, but the reliance on trusted data continues unabated. Therefore, the author believes that using blockchain technology from the perspective of data management can effectively help insurance companies improve their risk management capabilities. Specifically speaking, it is mainly divided into risk management of policyholders and risk supervision of insurance companies.
Blockchain-Network
What are the Ⅷ blockchain technology frameworks
The current mainstream blockchain architecture contains six levels: network layer, data layer, consensus layer, incentive layer, contract layer and application layer. The positions of the data layer and the network layer are reversed in the figure, and their main uses will be detailed in the next section.
Network layer: The essence of the blockchain network is a P2P (Peer-to-peer) network. The resources and services in the network are scattered on all nodes. The transmission of information and the implementation of services are directly between the nodes. It can be carried out in a short period of time without the intervention of intermediate links and servers. Each node both receives and generates information. The nodes synchronize information by maintaining a common blockchain. When a node creates a new block, it notifies other nodes in the form of broadcast, and other nodes receive the information. The block is then verified and a new block is created based on the block, thereby achieving the role of the entire network jointly maintaining an underlying ledger. Therefore, the network layer will involve the design of P2P network, propagation mechanism, verification mechanism, etc. Obviously, these designs can affect the confirmation speed of block information. The network layer can be used as a research direction in the scalable solution of blockchain technology;
Data layer: The underlying data of the blockchain is a block + linked list data structure, which includes data blocks, chain structures, timestamps, hash functions, Merkle trees, asymmetric encryption and other designs. Among them, data blocks and chain structures can be used as improvement directions for data layer research in the scalable solution of blockchain technology.
Consensus layer: It is the basis for highly dispersed nodes to achieve rapid consensus on the validity of block data. The main consensus mechanisms include POW (Proof Of Work) and POS (Proof of Stake). Mechanism), DPOS (Delegated Proof of Stake Delegated Proof of Stake Mechanism) and PBFT (Practical Byzantine Fault Tolerance), etc., which have always been the highlight of the scalable solutions of blockchain technology.
Incentive layer: It is what everyone often calls a mining mechanism. It is used to design a certain economic incentive model and encourage nodes to participate in the security verification of the blockchain, including the design of issuance mechanisms and distribution mechanisms, etc. This level of improvement does not seem to be directly related to blockchain scalability.
Contract layer: mainly refers to various script codes, algorithm mechanisms, smart contracts, etc. Strictly speaking, this layer is missing in the first generation of blockchains, so they can only conduct transactions and cannot be used in other fields or perform other logical processing, contractsThe emergence of the Ethereum layer has made it possible to use blockchain in other fields. This part of Ethereum includes EVM (Ethereum Virtual Machine) and smart contracts. Improvements at this level seem to provide potential new directions for blockchain scalability, but there seems to be no direct connection in structure
Application layer: It is the display layer of the blockchain, including various application scenarios and cases. . For example, Ethereum uses truffle and web3-js. The application layer of the blockchain can be the mobile terminal, the web terminal, or it can be integrated into the existing server, and the current business server is regarded as the application layer. Improvements at this level seem to provide potential new directions for blockchain scalability, but there does not seem to be a direct connection in structure.
The Xueshuo Innovation Blockchain Technology Workstation under Lianqiao Education Online is the only approved "Blockchain Technology Professional" pilot of the "Smart Learning Workshop 2020- Xueshuo Innovation Workstation" launched by the School Planning, Construction and Development Center of the Ministry of Education of China. workstation. The professional base is based on providing students with diversified growth paths, promoting the reform of the training model integrating professional degree research, production, and research, and building an applied and compound talent training system.
Ⅸ What is the six-layer model of the blockchain?
The blockchain has a total of six levels of structure. These six levels of structure from bottom to top are: data layer, network layer , consensus layer, incentive layer, contract layer, and application layer.
1. Data Layer
The data layer is the bottom layer of the six-level structure of the blockchain. We can understand the data layer as a database, but for blockchain, this database is an immutable and distributed database, which is what we call a "distributed ledger".
On the data layer, that is, on this "distributed ledger", the data information on the blockchain is stored, encapsulating the blockchain structure of the block, asymmetric encryption technology, hash algorithm and other technologies Means to ensure the security of data when it is disclosed to the entire network. The specific approach is:
On the blockchain network, nodes use consensus algorithms to maintain the consistency of data in the data layer (that is, this distributed database), using asymmetric encryption and hash algorithms in cryptography. , to ensure that this distributed database cannot be tampered with and is traceable.
This constitutes the lowest level data structure in blockchain technology. However, it is not enough to have a distributed database. The data information in the database also needs to be shared and exchanged. Next, we introduce the upper layer of the data layer - the network layer.
2. Network layer
The network system of the blockchain is essentially a P2P (point-to-point) network. Point-to-point means that there is no need for an intermediate link or centralized server to control the system. Everything in the network Resources and services are allocated to each node, and information can be transmitted directly between the two nodes. However, it should be noted that P2P
(peer-to-peer) was not invented by Satoshi Nakamoto. Blockchain just incorporates this technology.
So, DistrictThe network layer of the blockchain is actually a particularly powerful peer-to-peer network system. In this system, each node can both produce and receive information, just like sending emails. You can write your own emails or receive emails sent to you by others.
On the blockchain network, nodes need to jointly maintain the blockchain system. Whenever a node creates a new block, it needs to notify other nodes in the form of broadcast, and other nodes receive After receiving the information, the block is verified, and then a new block is created based on the block. In this way, the entire network can jointly maintain and update the general ledger of the blockchain system.
However, what rules should the entire network follow to maintain and update the general ledger of the blockchain system? This involves the so-called "laws and regulations" (rules), which is what we will introduce next: the consensus layer.
3. Consensus Layer
In the world of blockchain, consensus, simply put, means that the entire network must maintain and update the general ledger of the blockchain system according to a unified and agreed-upon rule. Similar to the rules for updating data. Allowing highly dispersed nodes to efficiently reach consensus in a decentralized blockchain network is one of the core technologies of the blockchain and is also the governance mechanism of the blockchain community.
The current mainstream consensus mechanism algorithms include: Bitcoin's Proof of Work (POW), Ethereum's Proof of Stake
(POS), EOS's Delegated Proof of Stake (DPOS), etc.
We have now introduced the data layer, network layer, and consensus layer. These three layers ensure that there is data and network on the blockchain, and there are rules for updating data on the network. However, there is no free lunch in the world. How to make it happen? Nodes can actively participate in the maintenance of the blockchain system. This involves incentives, which is what we will introduce below: the incentive layer.
4. Incentive layer
The incentive layer is the so-called mining mechanism. The mining mechanism can actually be understood as an incentive mechanism: how much you contribute to the blockchain system, you can get as many rewards as you want. Using this incentive mechanism, nodes across the entire network can be encouraged to participate in data recording and maintenance on the blockchain.
The mining mechanism and the consensus mechanism are actually the same. The consensus mechanism can be understood as the company's general rules and regulations, and the mining mechanism can be understood as, within this general rules and regulations, what you have done can What kind of reward you get, this kind of reward rules.
Just like Bitcoin’s consensus mechanism PoW, its stipulation is that the more work you do, the more you gain. Whoever can find the correct hash value first can get a certain amount of Bitcoin rewards;
And Ethereum PoS stipulates that the longer who holds the currency, the greater the probability of receiving rewards.
It should be noted that the incentive layer is generally only available in public chains, because public chains must rely on nodes across the entire network to jointly maintain data, so there must be such an incentive mechanism to encourage nodes throughout the network to participate in the blockchain system. Construction and maintenance to ensure the security of the blockchain systemand reliability.
The blockchain is safe and reliable, but it is not smart enough, right? The contract layer we will introduce below can make the blockchain system more intelligent.
5. Contract Layer
The contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, and is the basis for blockchain programmability. The "smart contract" we are talking about belongs to the contract layer.
If the Bitcoin system is not smart enough, then the "smart contracts" proposed by Ethereum can meet many application scenarios. The principle of the contract layer is mainly to embed code into the blockchain system and use this method to implement customizable smart contracts. In this way, on the blockchain system, once the terms of the smart contract are triggered, the system can automatically execute the order.
6. Application Layer
The last is the application layer. The application layer is very simple. As the name suggests, it is the various application scenarios and cases of blockchain. The "blockchain+" we are talking about now is the so-called application layer. The blockchain applications that have been implemented so far are mainly various blockchain applications built on public chains such as ETH and EOS. There are many gambling and game applications, and truly practical applications have not yet appeared.