At the 2021 Golden Chain Alliance Ecological Conference, the new FISCO BCOS v3.0 was officially released. This version has been comprehensively upgraded in terms of architecture, algorithms, security controllability and privacy computing collaboration, etc., to meet the needs of the digital economy era for the blockchain system to carry larger scale, more scenarios, and wider participation in industrial applications.
Previously, the FISCO BCOS open source community released the 2022 technology development route of FISCO BCOS v3.0, which is the first time to reveal the future technology development plan after the official release of v3.0 in December 2021.
So, what are the important features of FISCO BCOS v3.0? How to break through the bottleneck of blockchain performance, improve the efficiency on the chain, and meet the new needs of the digital economy era? With these questions, CSDN interviewed Li Huizhong, the head of the blockchain underlying platform of WeBank and senior architect of FISCO BCOS. The following is the interview record.
(Li Huizhong, head of the blockchain underlying platform of WeBank, senior architect of FISCO BCOS)
Three versions to meet various business needs
CSDN: Strategies such as "industrial digitization", "new data infrastructure", and "data elements" are all closely related to the blockchain. In your opinion, after the blockchain has risen to a national strategic technology, what are the significant changes in the development of the entire industry application?
Li Huizhong : As a tamper-proof, multi-centralized, safe and controllable technology, blockchain has ushered in a stage of rapid development after rising to a national strategic technology, and is more widely used in industrial digitalization to help the development of the real economy.
At the technical level, blockchain is more and more closely integrated with a variety of cutting-edge technologies and innovative scenarios, providing a series of digital infrastructure such as secure data storage, trusted transmission, and collaborative production for the digital economy era.
At the application level, more and more businesses in different fields (such as government affairs, cross-border data verification, finance, public welfare, medical care, education, etc.) have begun to introduce blockchain technology to build trust relationships to improve the efficiency of multi-party collaboration and reduce collaboration costs. . The integration of blockchain with industrial Internet, Internet of Things, digital economy and other fields has also become a trend.
At the industrial level, the state and government have increased investment in the development of blockchain technology talents, and open source communities related to blockchain, especially alliance chains, are flourishing. With the support of local governments, a large number of blockchain-related industrial parks, laboratories, incubators have emerged...
CSDN: What new challenges and requirements have these changes brought or will bring to blockchain technology? Can the current mainstream blockchain platforms meet these requirements?
Li Huizhong : The booming industrial digitalization process puts forward new demands on blockchain: the technology needs to carry larger-scale applications, more business scenarios and wider industry participation. This also means that the bottom layer of the blockchain needs a technology system that is easier to govern, more secure, more flexible and scalable, more efficient and easy to use, and more open.
In addition, with the further integration of blockchain with the industrial Internet, Internet of Things, digital economy, etc., higher requirements are also put forward for the performance, storage capacity, supervision, and operation and maintenance of the underlying platform of the blockchain. Therefore, it is an urgent problem to improve the horizontal scalability of the blockchain system from various dimensions such as network, computing, and storage, so that it can support massive service scenarios.
Based on the above considerations, FISCO BCOS redesigned and developed FISCO BCOS v3.0 from various dimensions, aiming to break the performance and storage bottlenecks of the underlying blockchain platform and build a blockchain system that can support massive services. For example, a new micro-service architecture design is adopted to realize modular hierarchical governance and parallel expansion; the "Deterministic Multi-Contract" (Deterministic Multi-Contract) is innovatively proposed to realize the pipeline consensus mechanism and hybrid scheduling, greatly improving The overall throughput of the system is reduced while the latency is reduced.
CSDN: This upgrade has launched three different versions: Air version, Pro version and Max version. Are the three versions for different groups? Which problems can be solved in which scenarios?
Li Huizhong : After 4 years of development, the FISCO BCOS open source community has gradually enriched the industrial roles in the ecosystem. In recent years, we have also encountered several types of typical users:
- Institutional users who have implemented applications, they have put into production and implemented many applications based on FISCO BCOS, and the business volume of the applications is increasing;
- Institutional users who operate the platform, they have built a BaaS platform based on FISCO BCOS to provide external services;
- Learning users represented by individual developers.
There is a big difference in the demands of these types of users: institutions with large business volumes on the chain need blockchain to support massive computing and storage, and can undertake the operation and maintenance of more complex systems; users of BaaS platforms need better blockchain links Entry, isolation, billing mechanism, etc.; while learning users most need easy-to-use and quick-to-use blockchain tools.
For the demands of different users, we try to provide a flexible and extensible development framework in FISCO BCOS v3.0, allowing different users to customize according to different scenarios and needs. So we created the "Lightweight Air Edition", "Pro Professional Edition" and "Large Capacity Max Edition".
The Air version adopts the all-in-one packaging mode, compiling all modules into a binary (process), and a process is a blockchain node, including all functional modules such as network, consensus, access, etc., using local RocksDB storage, It is suitable for beginners entry, functional verification, POC products, etc.
The Pro version includes two access layer services, RPC and Gateway, and multiple blockchain node services. The local RocksDB is used for storage. All blockchain node services share the access layer service, and the two access layer services can be extended in parallel. , suitable for production environments with controllable capacity (within T level), and can support multi-group expansion.
The Max version splits execution, consensus, storage, Gateway, and RPC into independent microservices, each of which can be independently deployed, scaled, and fault-tolerant, suitable for scenarios where massive transactions are on-chain.
CSDN: We know that many community partners are very concerned about the research and development of v3.0, and even participated in it. From v1.0 to v3.0, what are the different characteristics of the ecological development of FISCO BCOS?
Li Huizhong : From FISCO BCOS v1.0 to FISCO BCOS v3.0, both in terms of technology and open source community operation, the ecology of FISCO BCOS is becoming more and more mature and active. In 2015, it was difficult for developers to find a financial-grade blockchain underlying platform as a technical base to develop applications. FISCO BCOS v1.0 came into being in this scenario, but at that time, the blockchain application scenarios were limited, and the blockchain Platform features are also incomplete.
In 2019, the Political Bureau of the Central Committee emphasized in the 18th collective study that the blockchain should be taken as an important breakthrough for independent innovation of core technologies, and the development of blockchain technology and industrial innovation should be accelerated. More and more industries are beginning to combine with blockchain technology. Hundreds of industrial digital application practices of FISCO BCOS v2.0 have proved that open source blockchain technology is "usable" and is becoming more and more "easy to use".
Now, compared with FISCO BCOS v1.0 and FISCO BCOS v2.0, FISCO BCOS v3.0, on the one hand, focuses on the componentization of the blockchain system and improves the development efficiency of the underlying platform of the blockchain itself; The horizontal scalability of the blockchain system builds a blockchain underlying platform that can support massive services.
Today, the FISCO BCOS open source ecosystem has gathered more than 3,000 institutions and enterprises, 70,000 individual developers, and accumulated more than 200 industrial digital benchmarking applications, which play a pivotal role in promoting the development of industrial blockchain.
The active open source ecosystem also brings more possibilities for the evolution of technology. During the research and development of v3.0, the open source community spontaneously established a number of special interest groups, covering each key module, and community developers actively participated in the development of each R&D process. discuss. It is also with the participation and co-construction of the community that v3.0 can better solve the development pain points and meet the needs of the industry.
Break the shackles of large-scale commercial use
CSDN: There has been a saying in the industry that blockchain technology is currently unable to support large-scale commercial use, and is largely limited by the performance of the blockchain. How does FISCO BCOS v3.0 solve the performance constraints and deal with the problem of massive data on the chain?
Li Huizhong : In order to improve system performance and cope with massive data uploading to the chain, in terms of system architecture, FISCO BCOS v3.0 divides the blockchain system into microservice modules such as network, computing, storage, and scheduling. Each microservice can be independently deployed, expanded, and fault-tolerant, and applications can adjust the physical resources of the microservices to meet the network and performance requirements of the business, realizing the horizontal expansion of the blockchain system.
In terms of system design, FISCO BCOS v3.0 designs and implements two-stage parallel Byzantine consensus on the one hand, and divides the blockchain consensus algorithm into two stages of block batch parallel sorting consensus and block execution result pipeline consensus (two stages It can be parallelized), which improves the utilization efficiency of system resources and realizes the vertical scalability of the blockchain system; on the other hand, a deterministic multi-contract parallel scheme (DMC for short) is proposed, which can automatically schedule multiple transactions in parallel to different executors And to ensure the certainty of parallel transaction execution results, because the executor can be dynamically expanded, the limitation of machine resources on execution performance is eliminated, and the horizontal scalability of the blockchain system is improved.
In addition, in order to cope with the massive data storage scenario, FISCO BCOS v3.0 introduces a professional distributed database (such as TiKV) as the back-end storage engine, which can realize massive distributed data management while eliminating the limitation of local disk space on blockchain storage. .
CSDN: The overall architecture of FISCO BCOS v3.0 adopts a 5-layer design. What are the ideas and concepts of this design? What are the advantages compared to previous or other blockchain platform architectures?
Li Huizhong: FISCO BCOS v3.0 follows the principle of maximizing the horizontal scalability of the system, and divides the blockchain system into an access layer, a scheduling layer, a computing layer, a storage layer and a management layer. Each layer is an independently deployable layer. , capacity expansion and fault-tolerant microservices, while realizing the horizontal scalability of the system network, storage, and computing, and improving the robustness and operability of the system.
FISCO BCOS v3.0 adheres to the design idea of componentization, and abstracts each module and feature of the blockchain system into independent components. Based on these components, developers can quickly develop and assemble new blockchain underlying systems on demand, improving the development efficiency of the underlying blockchain platform.
CSDN: Please briefly introduce the working principle of DMC, how does it realize the mechanism of "zipper" passage?
Li Huizhong : The core idea of DMC (Deterministic Multi-Contract, deterministic multi-contract parallel scheme) is to ensure deterministic access to mutually exclusive resources during the execution of parallel transactions, which includes three goals.
Ease of use: The bottom layer of the blockchain automatically enables parallelism, without requiring users to pay attention to parallel logic and provide conflict fields in advance;
Efficient: Transactions in blocks are not repeatedly executed, and there is no pre-execution, pre-analysis or retry process;
Compatibility: This scheme can be used regardless of EVM, WASM, Precompiled or other contracts, using any consensus mechanism.
The DMC scheme first requires that there is no shared data between the smart contracts of the blockchain, each contract has an independent storage space, and other contracts cannot read and write. When executing a transaction, DMC will split the different smart contract code blocks called by all transactions in the block into multiple code segments, and the code blocks of multiple different smart contracts are executed interleaved. The boundaries of the split are cross-contract calls and mutually exclusive resources. access.
DMC enables multiple transactions calling different contracts to be executed in parallel. Since there is no shared data between smart contracts, parallel execution between different contracts can always ensure the consistency of the final result. When any smart contract makes a cross-contract call or accesses a locked mutually exclusive resource, DMC will suspend the execution of the transaction and wait for all other transactions in the current stage to be executed, or due to the cross-contract call and access Locked mutex resources are suspended, this waiting process is called global synchronization.
For each global synchronization, DMC will allocate cross-contract calls and mutually exclusive resource access of transactions according to fixed rules, ensuring that the same contract and mutually exclusive resources will not be accessed in parallel. Finally, while implementing parallelism, the consistency of execution results is guaranteed.
Compared with other parallel execution mechanisms, DMC implements an efficient and automatic parallel transaction scheduling strategy, which maximizes transaction execution performance and lowers the development threshold of parallel contracts.
CSDN: How are pipeline consensus and hybrid scheduling implemented? Compared with other consensus mechanisms, how is the underlying logic of this consensus different? What are the advantages?
Li Huizhong : In order to ensure the security and performance of the blockchain system, the current alliance blockchain system generally adopts the Byzantine consensus algorithm.
However, because each block header of the chain blockchain system must contain the hash of the parent block and the execution result of the current block, on the one hand, the block consensus must be performed serially (that is, the consensus on the Nth block). Must be done before starting consensus on the N+1th block). On the other hand, the blockchain consensus is tightly coupled with block execution and submission (that is, the entire block consensus process must include the steps of block execution and block submission). At the same time, in the process of low CPU usage such as block packaging and broadcasting consensus message packets, block execution cannot be performed in parallel, which seriously reduces the utilization efficiency of system resources and reduces the performance of the blockchain system.
In order to solve the performance problem of the serial consensus of the current blockchain system, FISCO BCOS v3.0 proposes a two-stage parallel Byzantine consensus algorithm, which divides the consensus of the blockchain system into block batch parallel sorting consensus and block block consensus. The execution result pipeline consensus has two stages, and the two stages can be performed in parallel. Both block batch parallel sorting consensus and block execution result pipeline consensus support parallel consensus on multiple blocks, thereby improving blockchain throughput.
CSDN: Please introduce what other research and development plans for the follow-up v3.0?
Li Huizhong: FISCO BCOS v3.0 has released three rc versions so far, and it is expected that the official LTS version will be released after the four rc versions are released.
With each release, we'll have some new features to focus on. For example, the released rc2 version has upgraded the componentized warehouse management; the rc3 version, which supports Solidity in parallel, can automatically perform contract analysis, parallel execution, parallel running, and parallel verification; the upcoming rc4 version can better support large-scale chain; the official LTS version will be released in the future, basically realizing all the functions and features originally planned for v3.0.
In the second half of this year, FISCO BCOS v3.0 will conduct more explorations in the fields of cloud native implementation, cross-group (chain) communication, and privacy computing integration, and will also promote comprehensive localization from technology implementation to project management. For example, to better support cloud native implementation; integrate the relevant capabilities of Lu Yu’s cross-chain protocol into v3.0 to achieve more convenient cross-chain; in terms of privacy computing integration, we plan to endow the privacy computing capabilities of Wezhong blockchain to v3. In the bottom layer of .0, v3.0 can better support the implementation of applications related to privacy computing scenarios.
Full link localization support to ensure data security and controllability
**CSDN: With the implementation of the Personal Information Protection Law in 2021, the industry pays more attention to the security of private data. For data security, what are the core technical advantages of v3.0? How are these advantages achieved?
**
Li Huizhong : The combination of blockchain and privacy computing can enable the original data to realize collaborative computing and data privacy protection between multiple nodes without the need for out-of-domain and collection. At the same time, it can solve the problems of excessive data collection, data privacy protection, and single-point leakage of data storage in the big data mode.
FISCO BCOS v3.0 can easily introduce a privacy computing platform in the form of an off-chain oracle at the computing layer, and then combine it with privacy computing to ensure the credibility of the computing process and data through the blockchain, and realize the availability of data through privacy computing. It can be seen that a wider range of data collaboration can be achieved.
CSDN: v3.0 provides the encapsulation interface of the basic components of national secrets. What impact can this upgrade have on developers?
Li Huizhong : Using the basic components of the national secret provided by FISCO BCOS v3.0, developers can quickly use the national secret algorithm and the national secret communication protocol.
There has always been a pain point for programmers. In order to adapt to national secrets and localization, it is necessary to adapt development on different platforms, different operating systems, and different programming languages one by one. The workload is huge, and each core logic change needs to be compatible with each change. Platforms, systems, and languages are miserable.
Since the beginning of research and development, FISCO BCOS has always attached importance to national secret access and localization support. In order to better realize national secret access in multi-language, multi-terminal and full link, FISCO BCOS v3.0 builds the general national secret basic components, which encapsulates the national secret algorithm, the national secret communication protocol, and the domestic encryption machine access protocol into a common base component. On this basis, FISCO BCOS v3.0 implements blockchain-related network, group, ledger, event and other logic into an independent shared library in C++ language, and encapsulates it to provide C language interface.
Based on this low-level C interface, developers can quickly connect and develop SDKs in different languages, platforms and systems, and these multi-language SDKs do not need to care about the underlying logic. The system upgrade only needs to update the underlying shared library, which greatly improves the efficiency of R&D management and ensures that The domestic security of the entire platform is controllable.
CSDN: This year, domestic technology has gradually risen, and FISCO BCOS has been localized since the beginning of the open source, from the national secret version to the full-link localization support. What are the considerations for this step-by-step layout? What are your plans for localization in the future?
Li Huizhong : As a safe and controllable domestic financial-grade blockchain underlying platform, FISCO BCOS has adhered to the concept of localization from the very beginning, and has achieved complete localization support from the national secret algorithm, operating system, chip architecture to server platform.
In the future, localization support will be carried out in more dimensions, such as adapting to domestic databases, supporting domestic encryption hardware, supporting more domestic chip architectures and operating system platforms, etc. In addition, more attention will be paid to the performance of the national secret blockchain.
For more dry goods, please pay attention to the FISCO BCOS open source community public account, visit the FISCO BCOS code repository to download all the source code of the project: https://github.com/FISCO-BCOS/FISCO-BCOS , please click the star collection in the upper right corner of the page , to get the latest version.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。