Technologies used in blockchain
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.
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
as shown in the figure above, the bottom is data, and the top can write data. A space to store data, a software to manage data, provide an interface to write data, this is the storage system. For example, MySQL is the most common storage system
What are the problems of ordinary storage system? There are at least two common problems
the first is the problem of non high availability. There is a dangerous place for data. In technical terms, data is not highly available
The second problem is that there is only one write point. In technical terms, it is a single point of control
How do ordinary storage systems usually solve these two problems
in fact, MySQL can do a master-slave synchronization of al master, master-slave synchronization of al master, 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
the application fields of blockchain include digital currency, token, finance, anti-counterfeiting traceability, privacy protection, supply chain, entertainment, etc. with the popularity of blockchain and bitcoin, many related top domain names have been registered, which has a great impact on the domain name instry
taking the tourism instry as an example, blockchain applications mainly focus on tourism travel, tourism community reviews, digital identity management, credit consumption management, tracking pilot's professional certificate and qualification, loyalty plan of hotels and airlines, reservation management and consumption points management. In addition, blockchain also has applications in finance, games, entertainment and other fields.
kuaishang takes the lead in applying blockchain technology to the voting field nationwide, effectively solving the trust problem of voting data, providing the most real and effective data for the participants, protecting the rights and interests of real voting users, and making blockchain technology "people-friendly", so that the general public can quickly perceive and share the information in the field of life services Enjoy the convenience of blockchain technology
Application of blockchain technology in digital asset registration
Jinzhu digital asset service platform takes the lead in using blockchain technology, which is a global distributed ledger technology with the characteristics of traceability, non tampering and non forgery. The digital assets of the platform come from the standard issuers of digital assets, and the asset value is determined by the open market to avoid overestimation or undervaluation
the application of blockchain technology in the financial instry
ant financial's independent and controllable financial grade commercial blockchain platform has been deployed in multiple social and commercial application scenarios by multiple institutions and countries. Ant blockchain platform supports second level confirmation for transactions, and the consensus mechanism uses efficient parallel consensus algorithm to ensure the high performance of the blockchain platform, Ant blockchain has been applied in many proction level applications, applying leading technologies to people's livelihood, commerce, finance and other fields.
the application fields of blockchain include digital currency, token, finance, anti-counterfeiting traceability, privacy protection, supply chain, entertainment, etc. with the popularity of blockchain and bitcoin, many related top domain names have been registered, which has a great impact on the domain name instry.
1.
Lianzhuang data block structure based on blocks
2.
network wide shared ledger
3.
asymmetric encryption
4.
source code open source
the technical basis of blockchain 2.0 era is as follows:
1.
smart contract; It is an application in the blockchain system. It is a business logic that can run automatically by coding. It usually has its own token and special development language<
2
3.
virtual machine: it is used to execute the compiled code of smart contract. Virtual machine is Turing complete
with the application and deepening of blockchain technology, the era of blockchain 3.0 has come. The mode of blockchain cooperation can be seen from behind the operation of all walks of life. Therefore, blockchain will change the way of human life widely and profoundly, so the whole life service will enter the era of blockchain. In the process of Internet development, blockchain + physical instry, blockchain e-commerce and blockchain community operation can be applied to blockchain technology
of course, 3.0 came into being with the development of modern cryptography. Today's applied cryptography is the result of cryptography 20 years ago. Therefore, in order to apply blockchain technology to more participation scenarios, especially in Internet economy and other aspects, more verification is needed to verify whether the existing encryption technology can meet the demand, and more in-depth integration of cryptographic frontier technology and continuous innovation are needed.
at present, China's blockchain instry mainly focuses on computing infrastructure, radiates digital currency, and derives to the penetration process of blockchain application. Infrastructure includes chip miner, mine pool and cloud computing power. Digital currency, wallet and exchange constitute the monetary system. Asset authentication, financial services and charity form a rich application ecology. From the development trend, the mining machine has experienced CPU, GPU, FPGA, until now through ASIC chips to customize mining, we can see from the mining machine calculation force curve that the mining machine calculation force has been in a soaring trend.
the main advantages of blockchain are that it does not need intermediary participation, the process is efficient and transparent, the cost is very low, and the data is highly secure
therefore, instries with any demand in these three aspects have the opportunity to use blockchain technology.