In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Quick introduction to Block chain (5)-- Evolution of Block chain Technology I. Development of Block chain Technology
Bitcoin blockchain is oriented to transfer scenarios and supports simple script calculation. If more complex computing logic is introduced, it will be able to support more application scenarios, namely intelligent contracts (Smart Contract). Smart contracts can provide more flexible contract functions in addition to currency trading functions and perform more complex operations.
The introduction of intelligent contract block chain has gone beyond the simple data recording function; it can add rights management and advanced programming language support to the block chain to achieve a more powerful distributed ledger system that supports more commercial scenarios.
The three typical evolution scenarios of blockchain technology are as follows:
II. Classification of block chain technology
According to the different participants, the blockchain can be divided into Public chain, Consortium chain and Private chain.
Public chain, that is, anyone can participate in the use and maintenance, and the participants are mostly anonymous. Typically, such as Bitcoin and ethernet block chains, the information is completely public.
If the license mechanism is further introduced, two types of private chain and alliance chain can be realized.
Private chain, limited by centralized managers, can only be used by a small number of internal people, the information is not public, and there is no obvious difference between the private chain and the traditional centralized accounting system.
The alliance chain is between the two, and several organizations work together (such as supply chain institutions or banking alliances, etc.) to maintain a blockchain. The use of the blockchain must be restricted access with permissions, and the relevant information will be protected. Typical, such as super-ledger projects. In architecture, most of the existing block chains include at least hierarchical structures such as network layer, consensus layer, intelligent contract and application layer, and the implementation of federation chain will introduce additional rights management mechanisms.
At present, the public chain has the highest degree of trust, and it is easy to initiate discussion, but in the short term, more applications will first land on the alliance chain. Public chain faces more security challenges and risks because it is facing anonymous disclosure scenarios; at the same time, in order to support Internet-scale transactions, it needs higher scalability, and performance bottlenecks are difficult to solve in a short period of time.
For the relationship between the degree of trust and the degree of centralization, the higher the degree of decentralization, the better the degree of trust. With the increase of the number of nodes, the trust degree in the early stage tends to grow rapidly, and after reaching a certain degree, the trust degree will not be significantly improved with the increase in the number of nodes. Because with the increase in the number of members, the cost of conspiring to do evil will rise exponentially.
According to the different purposes and scenarios, it can be divided into the currency chain for the purpose of digital currency, the property right chain for recording property rights, the crowdfunding chain for the purpose of crowdfunding, and so on, and there is also the so-called universal chain which is not limited to specific application scenarios. Because the universal chain needs to take into account the application characteristics in different scenarios, it needs to be more comprehensive in design.
Third, the evolution of block chain consensus algorithm 1. The development of block chain consensus algorithm
Common consensus algorithms for blockchain include Paxos, Raft, PBFT, POW, POS, DPOS and so on. With the development of blockchain technology, different blockchain projects integrate and improve the basic consensus algorithms in different application scenarios, resulting in a variety of new consensus algorithms, such as DBFT, BFT-DPoS, SBFT, VBFT, Tendermint and so on.
(1) DBFT
DBFT (Delegated Byzantine Fault Tolerant), the proxy Byzantine fault-tolerant algorithm, is based on the block chain consensus algorithm improved by PBFT.
In the DBFT algorithm, the super nodes participate in accounting, and ordinary nodes can see the consensus process and synchronize the account book information, but do not participate in accounting. A total of n super nodes are divided into a speaker and a member of parliament, and the speaker will be elected in turn. At each accounting time, the speaker first initiates the block proposal (the block content to be accounted for). Once at least (2n+1) / 3 accounting nodes (speaker plus MPs) agree to the proposal, the proposal becomes the final released block, and the block is irreversible, all transactions in it are 100% confirmed, and the block will not bifurcate.
In order to facilitate its application in the blockchain open system, DBFT improves the request response mode of the Cramp S (client / server) architecture in PBFT to a peer-to-peer model suitable for P2P networks, and improves the static consensus participants into dynamic consensus participants that can enter and exit dynamically, making it suitable for the open node environment of the block chain.
Because of the capacity expansion problem of the BFT algorithm, the DBFT algorithm selects the agent bookkeeper by the rights holder vote, and the agent verifies and generates the block, which greatly reduces the number of nodes in the consensus process and solves the inherent capacity expansion problem of the BFT algorithm.
The NEO project uses the DBFT consensus algorithm, and only seven super nodes are set up under the NEO consensus mechanism, which achieves high consensus efficiency with a weak centralization mode. Currently, the super node is statically selected and deployed entirely by the project side.
The advantages of DBFT are as follows:
A, high efficiency.
NEO generates a chunk every 15 seconds. The transaction throughput can reach about 1000TPS, and the optimized performance can reach 10000TPS.
B, good finality.
Blocks will not bifurcate, so as to verify the identity of participants, protect network security, so that the blockchain can be applied to real financial scenarios with high real-time requirements for transaction confirmation.
The disadvantages of DBFT are as follows:
A, low fault tolerance rate.
When one or more super nodes are malicious or down, the system will not be able to provide services.
B, the number of super nodes is too small, and the degree of centralization is high.
(2) BFT-DPOS
BFT-DPOS (Byzantine Fault Tolerance-Delegated Proof of Stake), that is, the stock authorization proof algorithm with Byzantine fault tolerance, is a consensus algorithm which is improved by introducing PBFT algorithm to DPOS in EOS project.
In the traditional DPOS consensus mechanism, each trustee broadcasts the newly created block to the whole network when it comes out of the block, but even if the other trustees receive the current new block, they are unable to confirm the new block and need to wait for their turn to confirm the previous block through the production block.
Under the BFT-DPOS consensus mechanism, each trustee still broadcasts the whole network when he comes out of the block, and when the other trustees receive the new block, they immediately verify the block, and return the signed block to the outgoing trustee immediately, without waiting for the other trustees to confirm it. Therefore, the out-of-block trustee produces a block and broadcasts it across the network, and then receives acknowledgments from other trustees one after another, and the block (including the transactions in it) is irreversible at the moment of receipt of the confirmation by the 2 + 3 trustee.
There are 21 super nodes in EOS, mainly for two reasons: first, because it is difficult for users to fully understand a large number of super nodes, so too many super nodes will reduce the activity of users to vote; second, the number of nodes with a scale of 20 can achieve efficient consensus with lower resource costs in Byzantine problems.
The main responsibility of the super node is to provide relevant computing resources and network resources to ensure the normal operation of the node; when it is a super node's turn to have the right to block, the super node collects all transactions in that period of time, and after transaction verification, it is packaged into blocks and broadcast to other super nodes, and other super nodes are verified to add blocks to their own database. In EOS, each outgoing block interval is defined as 3 seconds. Because in the current network environment, a super node packages the block and broadcasts it, most other super nodes take up to 3 seconds to receive the block. Only when the next super node receives the block broadcast by the last super node, the generation of the new block will not cause the block to be ignored to a super node. However, if a block is to become an irreversible block, it needs more than 2/3 super nodes to confirm. In DPOS, only a new block generated by the super node can confirm the previously received block chain. So after a block is generated, its subsequent concatenation of 14 blocks (2 of 21 super nodes) indicates that the block is irreversible, and the transaction in the block is irreversible. The whole confirmation process takes 45 seconds (including the block generation time of the outgoing block node).
In order to mine the performance of the EOS system, Daniel Larimer optimizes the BFT-DPOS and reduces the block speed from 3 seconds to 0.5 seconds, which can greatly improve the system performance in theory, but it brings the problem of network delay: a confirmation time of 0.5 seconds will cause the next chunk to be produced before the last chunk is received, and the next chunk will ignore the previous block. Causes the block chain to fork (there are two blocks at the same block height).
In order to solve the problem of network delay, Daniel Larimer changes the original random block order to the block order determined by the trustee after consultation, and the trustees with low network connection delay can be adjacent to each other, which greatly reduces the network delay between trustees, which makes it possible in theory to have a block speed of 0.5 seconds.
In order to be foolproof and not to let any trustee be skipped due to the accident of network delay, Daniel Larimer allows each trustee to produce six blocks in succession, that is, each witness is still responsible for 3 seconds of block production, but the initial production of only one to produce six. In the worst case, the last or two of the six blocks may be skipped by the next trustee due to network delays or other accidents, but the first few of the six blocks will have enough time to pass to the next trustee.
BFT-DPoS transaction confirmation time problem: each block will be broadcast across the network immediately after production, and the block producer will wait half a second to produce the next block and will receive the confirmation results of the previous block from other trustees. The production of the new block and the reception of the confirmation of the old block are carried out at the same time. In most cases, the transaction is confirmed within 1 second (including 0.5 seconds of block production and the time required for confirmation by other trustees) (irreversible).
The EOS system stipulates that once the block reaches an irreversible state (confirmed by the trustee), it cannot bifurcate before then to ensure the permanent credibility of the transaction. Even if most trustees want to bifurcate the block chain, they can only compete with the main chain at the same speed (0.5 seconds). Even if there is only one trustee left in the main chain, the bifurcation chain will never catch up with the main chain, ensuring the stability of the system.
The block chain pain points addressed by the EOS project are as follows:
A. low application performance
Both Bitcoin and Ethernet Square face bottlenecks in low application performance. With the growth of transaction volume and applications, the problems of network congestion and skyrocketing fees have become increasingly prominent. In terms of transaction speed, Bitcoin is 7 transactions per second, Taifang is 30-40 transactions per second, while EOS can reach millions of transactions per second, which can meet the needs of business-grade applications.
Based on graphene technology, EOS achieves millisecond confirmation speeds and millions of TPS through parallel chains.
B, poor security (DPOS consensus algorithm)
EOS uses the DPOS algorithm, bifurcation is basically impossible. The problem of chain bifurcation between Bitcoin and Ethernet Square is solved, thus ensuring the security of the whole network operation. Because the way block producers produce blocks is cooperative rather than competitive. If a block fork occurs, the DPOS consensus automatically switches to the longest chain. In addition, it does not occur that the block producer produces blocks on the bifurcations of the two block chains at the same time. If there is, it may be voted out.
C, the development is difficult.
Bitcoin can only be delivered as a currency and can only meet the function of transactions; Taifang has realized intelligent contracts, breaking through the monetary function of Bitcoin and taking a step into the non-financial field, but because of the complexity of its module, it is impossible for developers to easily create the applications they want to create; EOS handles the additional complexity and provides developers with a user-friendly underlying module that can support multiple programming languages.
D, high handling fee
EOS offers free services to users, and EOS public chain users do not have to pay fees compared to the high transfer fees of Bitcoin and Ethernet Fong. Developers create a corresponding profit model according to the size of users.
(3) SBFT
SBFT (Simpled BFT), the simplified Byzantine fault-tolerant algorithm, is a simplified version of the PBFT algorithm.
In Fabric's proposal, the SBFT (Simple BFT) algorithm is used. However, the Fabric0.6 version uses PBFT removed from PBFT,Fabric1.0, and uses Kafka and Solo to sort as consensus nodes. Fabric should implement SBFT in a later version.
(4) Tendermint
Tendermint is a modular block chain application framework that can implement Byzantine fault tolerance (BFT). Tendermint mainly consists of two parts:
A 、 Tendermint Core
Tendermint Core implements a P2P network, shares blocks and transactions among nodes, implements a Byzantine fault-tolerant consensus algorithm, and determines the unchangeable transaction order.
B 、 ABCI Interface
ABCI Interface is responsible for dealing with the specific logic processing layer, which can be implemented based on different languages (Golang,JS), and can achieve transaction verification processing and query operations.
Tendermint address: https://github.com/tendermint/tendermint
Tendermint official website: https://tendermint.com/
(5) VBFT
VBFT algorithm combines the ideas of POS, VRF and BFT. In the VBFT algorithm, nodes need to apply for participation in network consensus through equity mortgage. Since then, the system randomly selects n nodes from all the alternative consensus nodes through verifiable random functions, proposes and verifies the alternative blocks, and finally completes the block consensus by endorsing the verification results.
Consensus nodes constitute a consensus network, which is responsible for consensus on the transaction requests in the network and generate blocks, while the alternative consensus nodes constitute a candidate network, do not participate in the consensus, but maintain the state of synchronization with the consensus network. In addition, the candidate network monitors the consensus network and verifies the consensus block.
The flow of VBFT algorithm is as follows:
A. According to VRF, the filing proposal node is selected from the consensus network, and each alternative node puts forward the alternative block independently.
B. Select multiple authentication nodes from the consensus network according to VRF, and each verification node will collect candidate blocks from the network, verify them, and then vote for the highest priority candidate blocks.
C. Select multiple confirmation nodes from the consensus network according to VRF, statistically verify the voting results of the above verification nodes, and determine the final consensus result.
D. all nodes accept the consensus result of the confirmation node and start the next round of consensus process.
In the VBFT algorithm, the VRF value of each round of blocks is based on the volatile information of the previous round of consensus blocks, and the hash value of this information is calculated as the VRF value of the next round of consensus blocks. As a result, the VRF value of each block is verifiable.
According to the introduction of VBFT, when the nodes are selected according to VRF, the sort order of nodes is also determined, that is, the priority order of nodes. The existence of priority order provides a reference scheme for nodes to deal with the bifurcation of the main chain. Because malicious bifurcation is difficult to maintain the highest priority all the time, so as to achieve the purpose of curbing malicious bifurcation.
2. Selection of block chain consensus algorithm.
In the block chain network, due to the different application scenarios, the designed objectives are different, and different block chain systems use different consensus algorithms. Usually, in the case of private chain and alliance chain, there are strong requirements for consistency and correctness, and a consensus algorithm with strong consistency should be adopted, while in the case of public chain, it is usually impossible to achieve 100% consistency and correctness, and the consensus algorithm of final consistency (Eventual Consistency) is usually adopted.
The choice of consensus algorithm is highly related to the application scenario. Paxos algorithm or Raft algorithm is used in trusted environment, PBFT algorithm can be used in licensed alliances, POW,POS,Ripple consensus can be used in unlicensed chains, and consensus mechanism can be freely chosen according to the trust degree of counterparties.
IV. Key issues and challenges of blockchain 1. Privacy protection
Privacy protection has always been a key issue in the field of distributed systems. In the distributed scenario, due to the lack of independent management mechanism, the parties involved in the network can not guarantee to strictly abide by the protocol, and even deliberately try to obtain the data of others in the network, so it is difficult to restrict the theft of privacy.
It is a big challenge for distributed account books to achieve the right balance between sharing collaborative information and privacy protection, especially with the frequent security loopholes in the public account book system, which often cause tens of millions of dollars of risk. With the introduction of the General data Protection regulations (General Data Protection Regulation,GDPR), the compliance requirements for privacy protection are becoming more stringent. The traditional information security technology and formal verification technology expose the defects of not strong practicality when dealing with the new requirements, which need to be solved urgently. Especially in the field of medical and health care, there is the strongest demand for data privacy, which requires strict control of the source, ownership and scope of use of data, and the traditional means are difficult to meet the needs of privacy protection. it is necessary to organically combine new cryptographic methods such as zero-knowledge proof and homomorphic encryption, but there are still many problems in practical application.
2. Distributed consensus
Consensus is a classic technical problem in the field of distributed systems. There have been a large number of research results in academia and industry (including Paxos, BFT series algorithms, etc.).
The core of the distributed consensus problem is to ensure that a change gets a consistent implementation result in the distributed network, which is recognized by all parties involved, and the information is irrefutable.
The demand of distributed consensus is quite different in the scenario of public anonymity and the scenario with rights management, which leads to two kinds of ideas: probability-based algorithm and deterministic algorithm.
At first, the bitcoin blockchain considered the worst guarantee in the case of public anonymity. Through the introduction of POW workload proof strategy to avoid the malicious behavior of a small number of people, and through the probability model to ensure that the final participants agree to the longest chain. The core idea of POW algorithm is based on the game of economic interests, so that the participants of malicious destruction lose their economic interests, so as to ensure the cooperation of most people. At the same time, confirmation must be achieved after the generation of multiple blocks, which can be guaranteed in terms of probability. The main problems of probabilistic algorithms are low efficiency and waste of energy, such as POW,POS and DPOS algorithms.
Blockchain technology (such as super ledger) begins to consider consensus mechanisms that support more certainty, including BFT algorithms, in scenarios with permission, which can solve the problem of rapid confirmation.
Consensus will be a hot topic of great academic value for a long time, and the core indicators will include the proportion of fault-tolerant nodes, the speed of decision convergence, recovery after error, dynamic characteristics and so on. A series of probability-based algorithms such as POW theoretically allow less than half of the uncooperative nodes, while deterministic algorithms such as BFT allow uncooperative nodes of no more than 1 and 3.
3. Transaction performance
Generally speaking, blockchain is not suitable for high-frequency trading scenarios, but due to the needs of the financial system, the industry is very concerned about how to improve the trading performance of the blockchain system as much as possible, including throughput and confirmation delay.
At present, the open bitcoin blockchain can only support an average throughput of about 7 transactions per second, and the secure transaction confirmation time is about one hour; the throughput of Taifang blockchain is slightly higher, reaching dozens of chunks per second, but transaction performance is also a big bottleneck.
In order to improve the processing performance, on the one hand, we can improve the performance of a single node (such as using highly configured hardware), while designing optimized strategies and algorithms to improve performance; on the other hand, we can offload transaction processing (off-load) to the chain. Only the blockchain is used to record the final transaction information, such as the lightning network proposed by the bitcoin community. Side chain (side chain), shadow chain (shadow chain) and other ideas can also be used for reference in the current stage, which can improve the overall performance by 1 or 2 orders of magnitude.
In the scenario of alliance chain, there are certain trust premises and interest constraints among the participating parties, so a more optimized design can be adopted in exchange for performance improvement. Take the Hyperleger Fabric project as an example, under the configuration of ordinary virtual machines, a single client can achieve a transaction throughput of hundreds of times per second (Transactions per second,TPS), and thousands of transactions per second with certain engineering optimization or hardware acceleration.
At present, the open source blockchain system can meet the performance requirements of many application scenarios, but there is still a big gap between the large-scale trading system and the throughput performance of tens of thousands of transactions per second. According to the published data, the average processing value of VISA system is 2000 TPS, and the peak value is 56000TPS; the peak value of a financial payment system is more than 85000TPS; and the average processing value of large stock exchange is about 80000TPS.
4. Scalability
In common distributed systems, the processing capacity of the whole system can be expanded by horizontally adding nodes.
The performance of most blockchain systems largely depends on the processing capacity of a single node, which needs to meet high-performance, security, stability and hardware-assisted encryption and decryption capabilities. For example, for Bitcoin and Ethernet block chains, each core node involved in maintenance in the network should maintain a complete storage and process intelligent contracts. At this point, the total storage and computing capacity of the entire network depends on the capacity of a single node. Even when there are too many nodes in the network, the performance of the whole network may be degraded because of consensus delay. Especially in the public network, due to the existence of a large number of low-performance processing nodes, the problem will be more obvious.
In order to solve the expansion ability of the blockchain system, it is fundamentally to relax the restriction that each node must participate in the complete processing (the nodes in the network should be able to cooperate to complete the complete processing), which has been applied in the super-ledger project. at the same time, minimize the processing work of the core layer, and even use multi-layer processing structure to disperse transactions.
In the federation chain mode, we can use the high-performance node as the core node and the relatively weak node as the proxy access node.
In addition, the future will inevitably involve the cross-chain demand between different books. The Quilt project of the super ledger and the Interledger Payments working group of the W3C have studied this issue.
5. Safety protection
At present, the most popular application scenario of blockchain is finance-related services, and security is naturally the most sensitive and challenging issue.
6. Database and storage system
A large amount of information in the blockchain network needs to be written to files and databases for persistent storage.
The application of blockchain requires a lot of read and write operations, Hash calculation and verification operations, which is very different from the behavior of traditional databases.
Key-value databases such as LevelDB and RocksDB have high random write and sequential read and write performance, as well as relatively poor random read performance, so they are widely used in block chain information storage. But at present, the database technology oriented to block chain is still one of the technical difficulties that need to be broken through, especially how to support richer semantic operations. More targeted blockchain databases may emerge in the future, specializing in serving the new data services of blockchain, in which each record will include a complete block information, which will be naturally associated with historical information, and cannot be modified once it is written and confirmed. The smallest unit of all operations will be a block. Need to natively support efficient signature and encryption and decryption processing.
7. Integration and operational governance
There are already some information products and tools within and between enterprises, such as database in the core position, enterprise information management system, communication system and so on. When adopting new products, enterprises often focus on the smoothness of integration with existing business processes and information systems.
How to co-exist between the two systems, how to divide the labor, how to transmit each other's business transactions reasonably, how to troubleshoot and isolate the failures, how to migrate the existing data between different systems and how to prepare for disasters are all practical problems that need to be solved urgently. If it is not solved well, it will be a big obstacle to the landing of blockchain technology.
Although most blockchain systems support decentralized mechanisms at the platform level, they are often unable to do so at the operational and governance levels. Take the Bitcoin network as an example, many times in history, most of the computing power is concentrated in a few mining pools, while the evolution route of the software is concentrated in the hands of a small number of developers. Operation and governance mechanism is generally missing in the existing block chain system, but it is very important in practical application.
How to achieve a reasonable consensus and efficient governance is still an unsolved problem. In the public chain, we try to maintain the continuous operation of the system by linking tokens in the computer system with economic interests; in the alliance chain, we recommend alliance governance institutions to maintain and manage the alliance network by means of commercial cooperation and voting. However, the relevant mechanism still needs to be continuously improved and improved in the process of practice. Take the supply chain scenario as an example, it often involves hundreds of enterprises, dozens of upstream and downstream links, and strong dynamic, which requires the distributed account platform to provide a strong governance voting and authority control mechanism.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.