Position: Home page » Blockchain » How to understand the core technology of blockchain

How to understand the core technology of blockchain

Publish: 2021-05-24 20:10:21
1. First of all, we can take a look at the official website explanation of blockchain technology. In a narrow sense, blockchain is a kind of chain data structure that combines data blocks in a sequential way according to the time sequence, and it is a distributed account book that can not be tampered with and forged by means of cryptography
broadly speaking, blockchain technology is a new distributed infrastructure and computing paradigm, which uses blockchain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses intelligent contract composed of automated script code to program and operate data
as we all know, blockchain technology is an independent underlying architecture from bitcoin system. From the perspective of architecture model, it is a set of distributed ledger, which is naturally used for bookkeeping
in the blockchain technology, if you want to generate accounting records, you need to have the transaction and flow of funds. Therefore, in the initial blockchain technology, the cryptocurrency corresponding to the main network is used as circulation goods, and the circulation transaction records of cryptocurrency between the accounts of the main network of the blockchain will be recorded on the main network
different from other transaction record databases, transaction records on the main network of blockchain technology will be recorded on all block nodes (i.e. all data blocks) in the main network, which is the so-called decentralization principle. That is to say, in blockchain technology, there is no central database to store all records, Every block on the chain has the transaction data of the whole chain, that is to say, every data block is the center
another feature of blockchain technology is that it can't be tampered with, because every transaction on the blockchain will be recorded in all blocks on the chain, so no single data block can change the record. Even if you change it, all other data blocks will also record real data, and each group of data can be traced back to the first time
because of these characteristics of blockchain technology, after the advent of bitcoin, blockchain has also attracted a lot of attention, and many people also began to want to use blockchain technology to make a centerless, traceable and unchangeable data, so as to ensure the credibility of the data
however, blockchain technology also faces many problems, such as single application scenario, non modifiable original error data, non recoverable currency stolen by hackers, etc.
2. Blockchain technology uses mathematical methods to achieve distributed accounting and solve the trust problem, so as to complete the decentralization, which will bring far-reaching influence in many fields such as communication, finance, Internet of things, government management and so on
blockchain refers to the technical solution of collective maintenance of a reliable database through centralization and distrust in the past, and it is a technical way for the whole people to participate in bookkeeping. Previous bookkeeping methods were all centralized and needed centralized intermediary, whether it was traditional government, financial institutions, notarization institutions or emerging e-commerce platform and online payment platform
in economic hypothesis, information is sufficient. In fact, it is precisely because of insufficient information that there are very large intermediaries. The existence of intermediaries increases the transaction cost and raises the transaction threshold. In essence, blockchain technology is a large-scale collaboration tool. It makes direct value transfer possible by using pure technology for the first time, and continues the trend of Internet decentralization and disintermediation. Disintermediated blockchain technology will greatly subvert the information intermediary instry
blockchain technology is the basic technology for building bitcoin data structure and encrypted transmission of transaction information, which realizes the issue and transaction of bitcoin. The core of blockchain technology is that all the current participating nodes jointly maintain the transaction and database, so that the transaction is based on the principle of cryptography rather than trust, so that any agreed parties can directly carry out payment transactions without the participation of a third party
technically, a block is a data structure for recording transactions, reflecting the capital flow of a transaction. In the system, the transaction blocks are connected to form a main chain, and all the nodes participating in the calculation record the main chain or part of the main chain
a block contains the following three parts: transaction information, hash formed by the previous block and random number. Transaction information is the task data carried by the block, including the private keys of both parties, the number of transactions, the digital signature of electronic currency, etc; The hash hash formed by the previous block is used to connect the blocks and realize the sequence of past transactions; Random number is the core of the transaction. All nodes compete to calculate the answer of the random number. The node that gets the answer the fastest generates a new block and broadcasts it to all nodes for updating, so as to complete a transaction.
3.

From the perspective of technology and architecture, I will tell you my understanding of blockchain in common language

what is blockchain? In a word, blockchain is a storage system. To be more specific, blockchain is a distributed storage system without an administrator and each node has all the data

What are the common storage systems like

first, how to ensure high availability

the common storage system usually uses "rendancy" to solve the problem of high availability. As shown in the figure above, if the data can be copied into several copies and rendant to multiple places, high availability can be guaranteed. The data in one place is hung, and there is data in other places. For example, the master-slave cluster of MySQL is the same principle, and the raid of disk is also the same principle

two points need to be emphasized in this place are: data rendancy often leads to consistency problems

1. For example, in the master-slave cluster of MySQL, there is actually a delay in reading and writing, which means there is a inconsistency in reading and writing in a short period of time. This is a side effect of data rendancy

The second point is that data rendancy often reces the efficiency of writing, because data synchronization also consumes resources. If you add two slave libraries, the write efficiency will be affected. The common storage system is to use rendancy to ensure the high availability of data

so the second question, ordinary storage system, can write more

the answer is yes, for example, take this graph as an example:

in fact, MySQL can do a master-slave synchronization of al masters, master-slave synchronization of al masters, two nodes can be written at the same time. If you want to do a multi room multi live data center, in fact, multi room multi live data synchronization. What we should emphasize here is that multi-point writing often leads to the consistency problem of writing conflicts. Take MySQL as an example, suppose that the attribute of a table is self incrementing ID, then the data in the database is 1234 now. If one of the nodes writes and inserts a piece of data, it may become 5, and then these 5 pieces of data are synchronized to another master node, Before synchronization, if another write node inserts a piece of data, a piece of data with self incrementing ID of 5 will be generated. Then, after the generation, synchronize to another node, and the synchronized data will conflict with the two local 5's after it arrives, which will lead to synchronization failure and write consistency conflict. This problem will occur in the case of multi-point writing

how to ensure consistency in multi-point writing

the reform "Swan class" gives you more technical work

4. Introction to seven core technologies of blockchain operation on January 15, 2018
1. Blockchain links
as the name suggests, blockchain is a chain composed of blocks. Each block is divided into block head and block body (including transaction data). The block head includes the prevhash value (also known as hash value) of the previous block used to realize the block link and the random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the head of the previous block, and the random number calculation rule determines which miner can obtain the right to record the block
2. Consensus mechanism
blockchain is accompanied by the birth of bitcoin, which is the basic technology architecture of bitcoin. Blockchain can be understood as an Internet-based decentralized accounting system. A decentralized digital currency system like bitcoin requires the consistency of accounting of honest nodes without a central node, which needs blockchain to complete. Therefore, the core of blockchain technology is a consensus mechanism to reach a consensus on the legitimacy of transactions between indivials without mutual trust without central control
there are four main types of consensus mechanisms in blockchain: pow, POS, dpos and distributed consistency algorithm
3. Unlocking script
script is an important technology to realize automatic verification and contract execution on blockchain. Every output of every transaction does not point to an address in the strict sense, but to a script. A script is like a set of rules that constrain how the receiver can spend the asset locked on the output
the validation of transactions also depends on scripts. At present, it depends on two kinds of scripts: Lock script and unlock script. Locking script is a condition added to the output transaction, which is realized by a script language and located in the output of the transaction. The unlocking script corresponds to the locking script. Only when the conditions required by the locking script are met can the assets corresponding to the script be spent, which is located in the input of the transaction. Many flexible conditions can be expressed by script language. Interpretation script is similar to the "virtual machine" in our programming field, which runs in every node of the blockchain network in a distributed way
4. Transaction rules
blockchain transaction is not only the basic unit of a block, but also the actual effective content recorded by the blockchain. A blockchain transaction can be a transfer, or the deployment of smart contracts and other transactions
as far as bitcoin is concerned, a transaction refers to a single payment transfer. The transaction rules are as follows:
1) the input and output of the transaction cannot be empty
2) for each input of a transaction, if its corresponding utxo output can be found in the current transaction pool, the transaction will be rejected. Because the current transaction pool is the transaction not recorded in the blockchain, and each input of the transaction should come from the confirmed utxo. If it is found in the current trading pool, it is Shuanghua trading
3) for each input in a transaction, the corresponding output must be utxo
4) each input unlocking script must verify the compliance of the transaction together with the corresponding output locking script
5. Transaction priority
the priority of blockchain transaction is determined by the blockchain protocol rules. For bitcoin, the priority of a transaction to be included in a block is determined by the time when the transaction is broadcast to the network and the amount of the transaction. With the increase of transaction broadcast time on the network and the increase of transaction chain age, the priority of transaction will be improved and eventually be included by the block. For Ethereum, the priority of the transaction is also related to the transaction fee that the publisher is willing to pay. The higher the transaction fee that the publisher is willing to pay, the higher the priority that the transaction is included in the block
6. Merkle proof
the original application of Merkle proof is bitcoin, which was described and created by Satoshi Nakamoto in 2009. Bitcoin blockchain uses Merkle proof to store transactions in each block. So that the transaction can not be tampered with, but also easy to verify whether the transaction is included in a specific block
7. RLP
RLP (recursive length prefix) is one of the main encoding methods of object serialization in Ethereum. Its purpose is to encode the sequence of arbitrary nested binary data.
5. Many relationships between people are based on trust, such as friend relationship, cooperation relationship, transaction relationship, etc
take trading activities as an example. In the past, the two sides who did not trust each other usually chose an intermediary to guarantee a transaction. In the mobile Internet era, we chose Taobao shopping because Alipay provided us with an intermediate guarantee. We chose to drop dripping because it provided us with information matching.
however, these intermediaries are centralized and have their own interests. Sometimes they are not so reliable and trustworthy. Theoretically, Alipay's centralization of accounting has been artificially falsified. Part of the reason for Didi's troubles is that they only think from their own standpoint
what blockchain does is the machine of trust, which replaces the role of trust intermediary with code, ensures the fairness and justice of the whole system through consensus mechanism and distributed accounting, and provides a trust without trust
for example, in the future, people can abandon the intermediate platform and realize point-to-point docking and free trading through blockchain. Shopping does not need to go through an intermediary, and taking a taxi does not need to go through Didi. In this way, we can really achieve "no middleman to earn the price difference" and rece the cost.
6. Does Tianjin have a lawyer who knows bitcoin? This should be understood. Bitcoin lawyers.
7. For example, Hangzhou shimai Environmental Technology Co., Ltd. has made great progress in the instrialization of blockchain. The core technology of the company is the carbonization car with 26 patented technologies, which can solve the problem of harmless treatment of sick pigs and dead pigs caused by African swine fever. Through the movable characteristics of the carbonization car, the public food safety problem can be eliminated from the source of farmers in one stop. First of all, this mature technology has achieved good results, and has signed cooperation agreements with many local governments and relevant departments. Secondly, Hangzhou shimai has taken the lead in establishing a data center to transform all the carbonization vehicles of the company. The actual operation process of each vehicle has realized the distribution record, each dead pig has been photographed on the chain, the corresponding hash value has been generated, the whole process is traceable and traceable, and the advantages of blockchain technology have been used to ensure the whole process of harmless treatment.
8.

“ Blockchain technology is considered to be the next generation of disruptive core technology after steam engine, power and Internet. If the steam engine has released people's proctivity, the power has solved people's basic living needs, and the Internet has completely changed the way of information transmission, then the blockchain, as a machine for building trust, may completely change the way of value transmission of the whole human society& rdquo;


I just came into contact with the blockchain, and there are too many basic knowledge that I need to understand and know. Don't worry, I will popularize the knowledge for you today. Today, let's take a look at the public chain, private chain, alliance chain and side chain

Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750