区块链怎么形成的,区块链是如何生成的
请查看相关英文文档
『一』 How to develop a block into a blockchain What is a blockchain
1. The development of a block into a blockchain requires the software Go. Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
2. Blockchain is a term in the field of information technology. In essence, it is a shared database, and the data or information stored in it has the characteristics of "unforgeable", "full traces left", "traceable", "open and transparent" and "collectively maintained". Based on these characteristics, blockchain technology has laid a solid foundation of "trust", created a reliable "cooperation" mechanism, and has broad application prospects.
3. From a technological perspective, blockchain involves many scientific and technical issues such as mathematics, cryptography, Internet and computer programming. From an application perspective, simply put, blockchain is a distributed shared ledger and database, which has the characteristics of decentralization, non-tampering, full traceability, traceability, collective maintenance, openness and transparency. These characteristics ensure the "honesty" and "transparency" of the blockchain and lay the foundation for creating trust in the blockchain. The rich application scenarios of blockchain are basically based on the ability of blockchain to solve the problem of information asymmetry and achieve collaborative trust and consistent action among multiple subjects.
『二』What is the concept of blockchain? What exactly is blockchain? Read it in three minutes!
On October 25, 2019, Xinwen Broadcast sent a very important signal: the country must vigorously develop blockchain. After that, blockchain has become an Internet celebrity, and the figure of "blockchain" is floating in the streets and alleys. In fact, many technology companies have already deployed blockchain technology.
Although blockchain is very popular, many people do not know much about blockchain.
What is blockchain?
Let’s first take a look at how Du Niang explained it. Network display: Blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms.
Why is blockchain called blockchain?
The blockchain is linked by blocks one by one, and the blocks are storage units one by one, which record the communication information of each block node. The blocks are much like the records of the database. Writing data every time creates a block. With the expansion of information exchange, one block continues with another, and the result is called a blockchain.
What are the characteristics of blockchain?
Blockchain mainly has the following characteristics:
1. Decentralization: In the blockchain system, every node has equal rights. and obligations, there is no central control here. Decentralization has well established a trust connection between each other, although there is no central managementgovernance structure, but people can collaborate and trust each other. This mainly applies blockchain distributed ledger technology.
2. Openness: Blockchain data is open to everyone. Except for some encrypted information that is not open, everyone can check the data here.
3. Independence: The entire blockchain system does not rely on other third parties. All nodes can automatically and securely verify and exchange data within the system without any human intervention.
4. Security: Blockchain has a certain degree of security and cannot be tampered with. Because everyone in the blockchain system has the same ledger, if someone wants to tamper with it, it is possible to forge a non-existent record only if they control more than 51% of the accounting nodes. Of course, this is basically impossible. This is mainly due to the core technology of the blockchain: the consensus mechanism. The consensus mechanism has the characteristics of "the minority obeys the majority" and "everyone is equal".
5. Anonymity: Many people think that if the blockchain is so open and transparent, will we lose privacy? In fact, no, although the transaction information in the blockchain is open and transparent, the identity information of the account is encrypted and can only be accessed with authorization.
Now let me tell you a story to help you better understand the blockchain.
There are three people in the family, mom, dad, older brother and younger brother. Last year, my father was in charge of the family's account books. He was responsible for all the family's income and expenses alone.
However, on the day of Double Eleven, my mother, who has always been frugal, wanted to buy herself a beautiful piece of clothing on a certain online store. When she checked the account book, she found something was wrong. It stands to reason that except for some money deposited in banks and financial management, the whereabouts of the daily consumption money at home are all in this account book, but no matter how you look at it, it is wrong. Some consumption is clearly not recorded, but is recorded.
Later, my father took the initiative to confess that he couldn’t help but buy a pack of cigarettes.
Later, my mother changed her strategy and the whole family kept accounts. Everyone recorded their monthly consumption expenditure in their own account books. Whenever there was a transaction or consumption at home, my mother would shout, "Book it," and everyone would record the transaction in their own books. This is the decentralized accounting model, where everyone is the center and everyone has a ledger.
The previous accounting model for dad was centralized accounting. If dad wanted to do something alone, it would be difficult for anyone to see it. The decentralized accounting model has solved the problem of centralization very well. The disadvantage of bookkeeping is that it is very difficult for dad to tamper with the books.
For example, if my father wants to take some money from the ledger and secretly buy cigarettes, the amount of money is limited, and if he wants to take the money, he has to change the ledger, but he only tampered with his own ledger.No, he had to change the accounts of three people including himself. And this is undoubtedly more difficult than reaching the sky.
So, many times my father had the idea of smoking, but he had no choice but to give up the idea due to the current situation.
Are blockchain and Bitcoin the same thing?
In fact, blockchain and Bitcoin are not the same thing. It is just the underlying technology of Bitcoin. Bitcoin is the first digital currency applied by blockchain.
In 2008, Satoshi Nakamoto first proposed the concept of blockchain. In the following years, it became a core component of the electronic currency Bitcoin, serving as a public account book for all transactions. Blockchain was first applied to Bitcoin.
The origin of blockchain is to solve the problem of trust, and one of the most successful applications of blockchain is digital currency. Bitcoin is arguably the most successful application of blockchain so far.
What are the applications of blockchain?
The application of blockchain is actually very wide. In addition to digital currency, the future applications of Bitcoin are still very extensive. Blockchain technology has been widely used in different industries. Such as product traceability, copyright protection and transactions, payment and settlement, Internet of Things, digital marketing, medical care, etc., promoting different industries to quickly enter the "blockchain+" era.
1. Payment and clearing: Blockchain can abandon the role of transit banks, realize point-to-point payment, reduce transit fees, and accelerate fund utilization.
2. Product traceability: For example, if we buy a piece of clothing on a certain store, we can see the past and present life of this piece of clothing.
3. Securities trading: Traditional securities trading requires the coordination of four major institutions, which is inefficient and costly. Blockchain technology can independently complete one-stop services.
4. Supply chain: Introducing blockchain technology into the supply chain system, synchronizing information within the system can control all links, better complete division of labor and collaboration, and facilitate subsequent accountability.
5. Intellectual property rights: With copyright on the chain, our photographic works, musical works, literary works, etc. will become our information, and the ownership of the information will be confirmed and become our property.
『三』Blockchain technology
Background: After the birth of Bitcoin, it was discovered that the technology was very advanced, and blockchain technology was discovered. Bitcoin and blockchain technology were discovered at the same time.
1.1 The purpose of the birth of Bitcoin:
①Currency transactions have records, that is, ledgers;
②The disadvantages of centralized institution accounting - it can be tampered with; Yi Chaofa
Bitcoin solves the first problem: anti-tampering - hash function
1.2 Hash function (encryption method)
① Function: Convert a string of any length into a fixed-length (sha256) output. The output is also called a hash value.
② Features: It is difficult to find two different x and y such that h(x)=h(y).
③Application: md5 file encryption
1.3 Blockchain
①Definition
Block: Split the general ledger into zones Block storage
Blockchain: On each block, add a block header. It records the hash value of the parent block. By storing the hash value of the parent block in each block, all blocks are connected in order to form a blockchain.
②How does the blockchain prevent transaction records from being tampered with?
After the blockchain is formed, tampering with any transaction will cause the hash value of the transaction block to be different from that of its sub-blocks. , tampering was discovered.
Even if you continue to tamper with the hash value in the sub-block header, the hash value in the sub-block will be different from that in the grandchild block, and the tampering will be discovered.
1.4 The essence of blockchain
①The essence of Bitcoin and blockchain: a big ledger visible to everyone, only recording transactions .
②Core technology: Through cryptographic hash function + data structure, it ensures that the ledger records cannot be tampered with.
③Core function: Create trust. Fiat currency relies on government credibility, and Bitcoin relies on technology.
1.5 How to trade
① To conduct transactions, you need an account number and password, corresponding to the public key and private key
Private key: a string of 256-bit binary numbers , no application is required to obtain it, and you don’t even need a computer. You can generate the private key by tossing a coin 256 times.
The address is converted from the private key. The address cannot reverse the private key.
The address is the identity, which represents the ID in the Bitcoin world.
After an address is generated, it can only be known by everyone if it enters the blockchain ledger.
②Digital signature technology
Signature function sign (Zhang San’s private key, transfer information: Zhang San transfers 10 yuan to Li Si) = signature of this transfer
< p> Verify Korean verify (Zhang San’s address, transfer information: Zhang San transfers 10 yuan to Li Si, signature of this transfer) = TrueZhang San uses his own signature function sign() The private key signs this transaction.
Anyone can verify Korean vertify(), to verify whether the signature was issued by Zhang San himself who holds Zhang San’s private key. It returns true, otherwise it returns false.
sign() and verify() are cryptographically guaranteed not to be cracked. ·
③Complete the transaction
Zhang San will provide the transfer information and signature to the entire network. Under the premise that the account has a balance, after verifying that the signature is true, it will be recorded in the blockchain ledger. Once recorded, Zhang San's account will be reduced by 10 yuan, and Li Si's account will be increased by 10 yuan.
Supports one-to-one, one-to-many, many-to-one, and many-to-many transactions.
In the Bitcoin world, private keys are everything! ! !
1.6 Centralized Accounting
① Advantages of Centralized Accounting:
a. No matter which center keeps accounts, don’t worry too much
< p> b. Centralized accounting, high efficiency②Disadvantages of centralized accounting:
a Denial of service attack
b Stop service after getting tired
p>c Central institutions are vulnerable to attacks. For example, destroying servers and networks, committing self-intrusion, legal termination, government intervention, etc.
All attempts at confidential currencies with centralized institutions in history have failed.
Bitcoin solves the second problem: how to decentralize
1.7 Decentralized accounting
①Decentralization: Everyone can keep accounts. Everyone can keep a complete ledger.
Anyone can download open source programs, participate in the P2P network, monitor transactions sent around the world, become an accounting node, and participate in accounting.
② Decentralized accounting process
After someone initiates a transaction, it is broadcast to the entire network.
Each accounting node continues to monitor and continue transactions across the entire network. When a new transaction is received and the accuracy is verified, it is put into the transaction pool and continues to be propagated to other nodes.
Due to network propagation, the transactions of different accounting nodes at the same time are not necessarily the same.
Every 10 minutes, one person is selected from all accounting nodes in a certain way, and his transaction pool is used as the next block and broadcast to the entire network.
Other nodes delete the transactions that have been recorded in their own transaction pool based on the transactions in the latest block, continue accounting, and wait for the next selection.
③ Features of decentralized accounting
Every 10A block is generated every minute, but not all transactions within these 10 minutes can be recorded.
The accounting node that obtains the accounting rights will be rewarded with 50 Bitcoins. After every 210,000 blocks (approximately 4 years), the reward is halved. The total amount is about 21 million, and it is expected to be mined in 2040.
Recording the reward of a block is also the only way to issue Bitcoin.
④ How to allocate accounting rights: POW (proof of work) method
Compete for accounting rights by calculating mathematical problems on several accounting points.
Find a random number that makes the following inequality true:
There is no other solution except traversing the random numbers starting from 0 and trying your luck. The process of solving the problem is also called mining.
Whoever solves the problem correctly first will get the accounting rights.
If a certain accounting node finds the solution first, it will announce it to the entire network. After other nodes verify that it is correct, a new round of calculation will start again after the new block. This method is called POW.
⑤ Difficulty adjustment
The generation time of each block is not exactly 10 minutes
As Bitcoin develops, the computing power of the entire network does not increase.
In order to cope with changes in computing power, the difficulty will be increased or decreased every 2016 blocks (about 2 weeks), so that the average time for each block to be generated is 10 minutes.
#欧易OKEx# #BTC[超话]# #digital currency#
『四』How the blockchain was formed
Block The origin of the chain comes from Satoshi Nakamoto in 2008. Based on this ideological concept, the first product "Bitcoin" was born. The origins of blockchain technology are often attributed solely to the actions of a few mysterious geniuses working under the pseudonym Satoshi Nakamoto. This view of history often makes the technology seem almost magical and difficult to understand. It's even more fundamental when one understands the actual history behind the development of these systems. In this section, I will outline the most important topics from the decades of research on consensus algorithms and distributed systems that led to the creation of blockchains.
『Wu』What is the formation method of blocks in blockchain technology
Chongqing Jinwowo analysis believes that the formation method of blocks in blockchain technology is as follows:
1-Record relevant information in local memory into the block body;
2-Generate a merkle tree of all relevant information in this block in the block body, and save the value of the merkle tree root in the block body In the block header;
3-Use the SHA256 algorithm to generate a hash value from the block header data of the previous block just generated and fill it into the parent hash value of the current block;
4-Put The current time is saved in the timestamp wordParagraph;
5-The difficulty value field will be adjusted according to the average generation time of blocks in the previous period to cope with the changing overall calculation amount of the entire network. If the total calculation amount increases, the system will increase it. The difficulty value of the math problem is such that the expected time to complete the next block is still within a certain period of time.
『Lu』 What is a block
In blockchain technology, valuable information is permanently stored in the form of data. These carriers used to store data information are called for the block. Technically speaking, a block is a data structure that records transactions and reflects the flow of funds for a transaction. Blocks are arranged in chronological order. Each block records the transaction information that occurred during its creation. All blocks are linked in an orderly manner to form a "general ledger", and each block can be used as a page in the general ledger. .
Each block contains elements:
①The ID of this block;
②Several transaction orders;
③ The ID of the previous block.
Block
In the Bitcoin system, a block is created every 10 minutes. This block records everything that happened during this period. trade. At the same time, each block contains the ID of the previous block, so the previous block can be found based on this ID, and so on, tracking the starting block (refer to the genesis block), thus generating a complete The transaction chain forms a blockchain.
The Xueshuo Innovation Blockchain Technology Workstation under Lianqiao Education Online is the only "blockchain technology" approved by the "Smart Learning Workshop 2020- Xueshuo Innovation Workstation" carried out by the School Planning and Construction Development Center of the Ministry of Education of China. Professional” pilot 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 origin of blockchain
Blockchain originated from Bitcoin. On November 1, 2008, a person claiming to be Satoshi Nakamoto People published the article "Bitcoin: A Peer-to-Peer Electronic Cash System", which elaborated on the architectural concept of an electronic cash system based on P2P network technology, encryption technology, timestamp technology, blockchain technology, etc., which marked the development of Bitcoin. Birth.
Two months later, the theory came into practice, and on January 3, 2009, the first genesis block with serial number 0 was born. A few days later, block number 1 appeared on January 9, 2009, and was connected to the genesis block number 0 to form a chain, marking the birth of the blockchain.
In recent years, the world's attitude towards Bitcoin has been ups and downs, but blockchain technology, one of the underlying technologies of Bitcoin, has received increasing attention. In the formation process of Bitcoin, blocks are storage units one by one, recording all communication information of each block node within a certain period of time.
The links between each block are realized through random hashing (also called hash algorithm).The latter block contains the hash value of the previous block. As the exchange of information expands, one block follows another, and the result is called a blockchain.
(7) How does the blockchain form blocks? Extended reading:
Characteristics of the blockchain:
1. Go Centralization. Blockchain technology does not rely on additional third-party management agencies or hardware facilities, and there is no central control. In addition to the self-contained blockchain itself, each node realizes self-verification, transmission and management of information through distributed accounting and storage. Decentralization is the most prominent and essential feature of blockchain.
2. Openness. The foundation of blockchain technology is open source. In addition to the private information of the transaction parties being encrypted, the data of the blockchain is open to everyone. Anyone can query the blockchain data and develop related applications through the public interface. Therefore, the entire System information is highly transparent.
3. Independence. Based on consensus specifications and protocols (similar to various mathematical algorithms such as the hash algorithm used by Bitcoin), the entire blockchain system does not rely on other third parties. All nodes can automatically and securely verify and exchange data within the system without the need for any human intervention.
4. Security. As long as you cannot control 51% of all data nodes, you cannot manipulate and modify network data at will. This makes the blockchain itself relatively safe and avoids subjective and artificial data changes.
5. Anonymity. Unless required by legal regulations, technically speaking, the identity information of each block node does not need to be disclosed or verified, and information transfer can be carried out anonymously.
『8』What is blockchain? What does blockchain consist of?
1. Blockchain is a concept of Bitcoin. It uses a block chain data structure to verify and store data.
2. Use distributed node consensus algorithm to generate and update data. Use cryptography to ensure the security of data transmission and access.
3. A new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data. It is essentially a de-intermediated database.
4. Generally speaking, a blockchain system consists of a data layer, a network layer, a consensus layer, an incentive layer, a contract layer and an application layer
『玖』 Blockchain What is a block in technology?
A block is a collection of many transaction data, which is marked with a timestamp and a unique mark of the previous block. Valid blocks will be appended to the main blockchain after they are approved by the consensus of the entire network. Blockchain is a data structure in which blocks containing transaction information are linked in order from back to front.
The blockchain is connected by a series of blocks generated using cryptographic algorithms. Each block is filled with transaction records, and the blocks are connected in order to form a chain structure, which is the blockchain ledger. Taking Bitcoin as an example, when miners generate a new block, they need toThe hash value, new transaction block and nonce are used to calculate the new hash value and nonce.
(9) How does the blockchain form blocks? Extended reading: < /p>
Each block is generated based on the data of the previous block. This mechanism ensures the uniqueness of the blockchain data. Because subtle changes in transaction records can completely change the result of the hash value.
So miners cannot cheat when competing for computing power. Each miner must wait for the previous block to be generated before starting to calculate qualified random numbers based on the data of the previous block, ensuring that mining Mine fairness.
『Shi』What is blockchain and how was it born? What are the types of blockchain?
If you want to understand blockchain, you must first understand the basic structure of the program. Everything we see on the Internet is constructed through computer language. There are many kinds of computer languages, but the most basic characters that make up the language are codes, and blockchain technology is a way of applying codes, which is different from traditional centralization. The difference between the models is that the blockchain has the characteristics of immutability, privacy, security, and consensus.
There are many application scenarios for blockchain. The most successful case so far is Bitcoin, followed by electronic invoices, cross-border payments, etc. Based on the interoperability of data, it is impossible to With characteristics such as tampering, it can also be used to save some important data. As long as this data uses blockchain technology as the underlying technology, it can never be destroyed and will be saved forever. No person or institution has the ability to modify or delete it. In addition, there are certain intersections between blockchain payment and education, medical care, credit reporting, automobiles, transportation and other fields. It is a technology, not a certain product, so there is only one type of it, but with the application As the scene changes, its role is also different. It can be integrated with existing scenes in almost any field and then derive other applications.