【Researcher Perspective】Blockchain: From entry to mastery

Yan Ying and Chen Yang, researchers from the blockchain project of Microsoft Research Asia, took the 2nd Ethereum Developers Conference held in Shanghai as an entry point and shared with us the current cutting-edge trends and trends of blockchain technology.

1. What is Blockchain?

       To talk about the hot spots that have attracted attention and discussion from all walks of life recently, the blockchain must be counted as one: so far, the world’s largest investment projects in 2016 are all related to the blockchain, with investment amounts of US$55 million and US$60 million respectively. The largest blockchain project was also announced at the end of September with an investment of more than $20 million.

       Where is the charm of blockchain? If today's Internet is the point-to-point transmission of information through the TCP/IP protocol, it is an information Internet, then how can value (such as electronic currency, electronic assets, etc.) be transferred point-to-point without a third party? Blockchain technology provides a possibility.

       Blockchain is a decentralized distributed accounting system. The nodes in the system do not need to trust each other, and jointly maintain a ledger through a unified consensus mechanism, and each node has a complete data record. Blockchain Blockchain, blocks of transactions are connected together through cryptographic algorithms, making the entire ledger open, transparent, traceable, and tamper-proof.

       Bitcoin, as a global encrypted Internet currency, is developed based on blockchain technology, and the support of smart contracts on the blockchain makes the wider, point-to-point transfer of digital assets other than Bitcoin a reality, which is It is not difficult to understand why blockchain technology has become attractive as the cornerstone of the Internet of Value.

2. What is Ethereum and its Devcon?

       As one of the world's most well-known blockchain projects, Ethereum also has the world's largest blockchain open source community. Simply put, Ethereum is a public blockchain platform with SmartContract functions. Using a smartphone as an example, if Ethereum is the operating system of the smartphone, then the smart contract is the application (app) on it. With Ethereum, users can directly develop their own blockchain applications without worrying about the underlying blockchain system.

This is the second Ethereum Developers Conference. Not only the core team members of Ethereum were present, but also representatives of the Ethereum industry, developers and community members from all over the world. Microsoft is the top sponsor of the conference and will continue to cooperate with Ethereum to build Microsoft Azure cloud "Blockchain as a Service" (BaaS: Blockchain-as-a-Service).

Ethereum Purple Revolution

       At this year's conference, the founder of Ethereum, Vitalik Buterin, released the Mauve Paper, which describes the key improvements of the next generation of Ethereum (Ethereum 2.0), pointing to two major problems in Ethereum: Proof of Work ( The consensus mechanism based on proof-of-work is inefficient, energy-consuming, not environmentally friendly , and the throughput and capacity of the Ethereum public chain system are not enough to support large-scale high-frequency use around the world .

       For the first question, the Purple Paper proposes a new proof-of-stake-based consensus mechanism, named Capser, which allows participants to participate in "mining" and purchase a large number of general-purpose computers from the original Or specially customize the "mining machine" and consume a lot of "useless" calculations to compete for the construction and income rights of blocks, and transform it into directly converting funds into Ethereum and injecting them into the Ethereum blockchain, "mining" related intelligence The contract (Smart Contract) automatically and randomly distributes block construction and income rights in proportion to the amount of funds injected. Coupled with a well-designed set of economic incentives with clear rewards and punishments, this new consensus mechanism is expected to make the Ethereum public chain safer, more efficient and greener.

       However, the complexity of the new consensus mechanism based on proof-of-stake is significantly higher than that of the existing consensus mechanism based on proof-of-work. Some community members still have doubts about the reliability and correctness of the new mechanism, and they still need to invest a lot of energy and time to complete it. Jointly improve and verify.

       For the second question, regarding the limitations of throughput and capacity, the Purple Paper proposes two solutions: shortening the block generation interval (blocktime) and partitioning (sharding). Under the premise of ensuring safety, the new algorithm reduces the block generation interval from 12 seconds to 4 seconds, and triples the throughput. The new partition mechanism divides the blockchain into 80 relatively independent partitions (sharding). Each node of Ethereum does not need to process all transactions and store all data in the entire network, just focus on one or a few of them The transactions and data of the partitions are sufficient, and all nodes complete the goal of covering all partitions through division of labor. Doing so would increase the capacity of Ethereum by 80 times its current capacity. At the same time, since the transactions of each partition can be processed concurrently, the throughput is further improved to 240 times (3x80) the current level.

       But there is a price for doing so: before partitioning, no matter how many smart contracts are involved in a transaction, all changes to the state of these smart contracts can be completed atomically, which greatly simplifies the programming and reasoning of smart contracts. After partitioning, if a transaction involves a cross-zone smart contract call, since the cross-zone call can only be completed asynchronously, a transaction will be executed in segments and lose its atomicity, which essentially changes the execution model of the smart contract , increasing the complexity of reasoning and programming. This is the price of scaling.

        Nevertheless, as the core infrastructure of the Internet of Value, the blockchain technology platform supporting smart contracts represented by Ethereum is constantly breaking through technical difficulties and moving forward at an exciting speed, which deserves further tracking, research and participation.

Smart Contract Security

       Simply put, a smart contract is a piece of computer code used to directly control the transaction of electronic assets. The relationship between smart contracts and blockchain can be compared to mobile applications and smartphones. Smartphones provide computing platforms for mobile applications, and diversified mobile applications greatly enrich the application scenarios of smartphones. Similar to this, smart contracts can be seamlessly connected with blockchain technology, making the blockchain programmable and customizable. Smart contracts therefore endow the blockchain with intelligence, enabling the blockchain to break through the traditional barrier of remittance. Application, so that the blockchain can be applied in more complex logic.

       The power of a smart contract that differs from ordinary program codes is that it is stored publicly and unchangeably on the blockchain, and is faithfully executed by the nodes of the entire network of the blockchain under defined internal and external conditions. It is impossible for anyone to unilaterally tamper with and prevent the execution of smart contracts. This is the fundamental reason why the smart contract is trustworthy, but it is also a "natural defect" of the smart contract, because of this nature, the loopholes in the smart contract cannot be repaired in time, and the attacks that exploit the loopholes are difficult to be stopped in time, resulting in real threat.

       There have been practical examples in this regard, the most representative one being The DAO attack. The DAO project, as the largest crowdfunding project in the blockchain industry, aims to provide important resources to entrepreneurial teams and projects based on Ethereum, but the smart contract written by it has the problem of "recursive call loophole". Unfortunately, while programmers were fixing this and other issues, an unknown hacker began exploiting the bug to collect ether from The DAO token sale, causing The DAO to lose close to $50 million. In order to recover the huge losses, the Ethereum community adopted a controversial and highly moral hazard hard fork (hardfork), rolling back to the block before the attack, and re-growing a block chain that does not contain the results of the attack. Although the newly generated chain conforms to the mainstream public opinion of the community, it is still resisted by some members of the community because it violates the principle that the blockchain cannot be tampered with.

       It is worth emphasizing that this is not a loophole in the Ethereum platform itself, but a loophole in some smart contracts on Ethereum. Loi Luu, a doctoral student at the National University of Singapore, introduced his thesis on smart contract security [1] at this conference. He analyzed 19,366 smart contracts on the Ethereum blockchain and found that about 44% of smart contracts have security risks.

       Effective prevention of these risks is a prerequisite for the widespread application of smart contracts. Therefore, both the open source community and the academic community are working hard to solve the security problems of smart contracts. The IC3 research group, composed of researchers from academic institutions such as Cornell, the University of California, Berkeley, the University of Illinois at Urbana-Champaign, and the Israel Institute of Technology, proposed three strategies to solve the security problems of smart contracts: The contract is formally verified, and a crisis response mechanism is built into the smart contract to establish an incentive mechanism for discovering and repairing smart contract vulnerabilities. Researchers from the three research institutions of Microsoft Research, the French National Institute of Information and Automation and Harvard University also recently jointly published an article, explaining the formal verification of the Ethereum smart contract platform itself (Ethereum virtual machine) and smart contracts. The cutting-edge exploration of [2].

Web 3: Decentralized Next Generation Web Infrastructure

       An important member of the Ethereum ecosystem, the decentralized storage system Swarm, and its core developer, Viktor Trón, delivered a series of speeches at the conference, depicting a decentralized Web vision with Ethereum as the core: Web 3.

       In this grand vision, Ethereum serves as a decentralized computing platform, supplemented by Swarm and IPFS (InterPlanetary File System) as a decentralized encrypted storage platform, and a decentralized messaging platform represented by Whisper , forming a complete set of next-generation Web infrastructure with P2P network as the core. Decentralized applications (Dapps) developed based on this infrastructure directly use the storage, computing, and messaging services provided by P2P networks distributed around the world, and have the characteristics of high fault tolerance, anti-attack, high availability, and anti-censorship. This makes decentralized application developers no longer need to set up and maintain special servers, but directly purchase the required computing and encrypted storage services from the P2P network through the application users to use these applications, and naturally obtain their own data ownership and control. This is a revolutionary difference from the existing web architecture where all user data is naturally concentrated on servers set up and controlled by application or website developers. What makes all this possible is the global decentralized electronic currency system based on blockchain technology.

       As a decentralized cloud computing platform, Web 3 is a beneficial supplement to the existing centralized cloud computing platform. The existing centralized cloud computing platform has the characteristics of low cost, high efficiency, high performance, and rich functions that the decentralized platform does not have, and the decentralized cloud computing platform is more suitable for building a neutral platform because it is not controlled by a single entity. Highly demanding, cross-agency trust infrastructure. These two are not a relationship that replaces each other, but a relationship that coexists, learns from each other and develops together. Looking forward to the collision and integration of these two cloud computing platforms in the future, it will be extremely exciting, and it will surely promote the further development of cloud computing technology and cloud computing ecosystem, and promote cloud computing technology to have a more profound and extensive impact on all aspects of human production and life. .

Microsoft BaaS – Bletchley

       The important thing is at the end: Microsoft has been actively supporting the development of the entire blockchain open source community and ecosystem. Launched a fully open blockchain service (Blockchain-As-A-Service) on the conference, providing a one-click deployment and development and testing platform for various blockchain projects and technologies, and also released a zone code-named Bletchley at this conference. The V1 version of the blockchain ecosystem framework.

       Microsoft's Bletchley framework is compatible with all blockchain systems and technologies, and provides access control, identity authentication, encryption and decryption, smart contract security verification, code security execution container, development and debugging, big data analysis and Machine learning and blockchain applications and smart contract market services, and build a set of first-party and third-party related software services and various industry solutions based on this.

       It is particularly worth mentioning the code security execution container named Cryplet, which containerizes the hardware-based security isolation execution environment, and provides a key code for the blockchain to interact with the outside world in the form of on-demand cloud services. A secure execution environment that cannot be snooped or tampered with. Cryplet is not only suitable for injecting events in the external world that smart contracts rely on (such as stock prices, weather conditions, etc.) Trigger external events. The unobservable nature of Cryplet makes it especially suitable for running private algorithms that require confidentiality and processing sensitive data, which greatly expands the application boundaries of blockchain systems. In addition, Azure also cooperates with blockchain platforms and start-up companies in China to provide localized blockchain application market services, facilitating the one-click deployment of local blockchain systems on Azure and helping the region Development of blockchain technology in China.

Reference papers:

[1]. Loi Luu,Duc-Hiep Chu et al. "Making Smart ContractsSmarter"

[2]. http://research.microsoft.com/en-us/um/people/nswamy/papers/solidether.pdf

About the Author

Yan Ying: Researcher in charge of Microsoft Asia Research Institute, engaged in research on blockchain technology, big data analysis and mining, and database applications. Published more than 30 papers in top conference journals at home and abroad, and more than 10 patents.

Chen Yang: Researcher, Microsoft Research Asia Cloud Computing and Mobile Computing Research Group, engaged in blockchain, cloud computing platform architecture, big data systems, and compilation research.

Guess you like

Origin blog.csdn.net/weixin_45709013/article/details/128986222