Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain


 369 total views

The “abstraction” level of the blockchain is to determine what can be moved to the table to be governed and discussed. It is an important challenge faced by the new blockchain.

Speech: Xie Hanjian, Architect of Nervos Network

Hello everyone! I am Xie Hanjian, the architect of Nervos Network. I am very happy to share with you the topic I want to talk about today-“Blockchain Abstraction and Evolution”.

What is the biggest challenge facing the blockchain?

I don’t know if you have ever read this sentence, which means: The biggest challenge facing the new blockchain today is not “speed” and “throughput”, but “governance”.

The so-called second-generation blockchain, the new blockchain has been developed to this day, and it has been five or six years. If you look back on some of the previous ideas, you can see that the thinking at the time may not be so correct.

When everyone wanted to build a new blockchain a few years ago, they thought, “If I solve the performance problem of the blockchain, will I create a new generation of systems that can defeat Ethereum, and what can I do? How is it?” Wait.

But the development of the blockchain industry in the past few years has falsified this idea, because we can see that there are new blockchains coming out, and their performance is indeed very good, but everyone still thinks that we are still in Ethereum. The era has not entered the next era, and has not felt the era from “Bitcoin” to “Ethereum”. This feeling does not exist. Although today’s new blockchain has good performance, it can process every second. Thousands of transactions.

Some people say that the biggest challenge we face is “governance.”

In fact, I also agree that “governance” is indeed a big problem facing the blockchain industry now, and this question is an “Open question” with no answer. Different blockchain communities and different blockchain teams are discussing it. How to manage such an open P2P autonomous project? Governance is indeed a difficult issue.

But I want to say that this is not the only problem, so and “Abstraction”, “abstraction” is also very important. The issue of “governance” is that if we, as a community, can determine whether the blockchain platform should do something, then the “abstraction” level of the blockchain determines what can be moved to the table to be governed and Discuss, discuss what kind of issues should be done or should not be done.

Therefore, I think “abstraction” is also a very important challenge facing the new blockchain.

What is “abstraction”?

The word itself is very abstract.

Abstract itself is a more technical term. There are two explanations. We only need to care about the first one: the so-called abstraction is a process. We remove particularity from a system, and then create generality and universality from the system.

This is a process of generalization. By removing the special design and finding out the commonalities, the system can become more general and can be applied to more scenarios.

This explanation may still be very abstract. Everyone should remember that the key word is to remove “speciality”, remove “speciality” from the system, and find more common and “general” things in the system to create in the design. general”.

Explain with a not-so-blockchain example.

You may have played a game console, at least when I was a kid, I would play a large so-called arcade in a game hall. If you know such a machine, you know that each machine actually corresponds to a game. For the arcade machine, the system design is an integrated design from software to hardware. All designs are designed to serve one purpose, which is this game. .

When we need to create another new game, I need to design a new machine. So there are ten or twenty machines in the game hall, and each machine is a different game.

The most popular thing in the development of the game industry today is no longer an arcade machine, but a general game platform like XBox.

XBox is a generalized design. You can design a variety of games for XBox, and then you can only buy different games to run and play on this system.

Therefore, from arcade to XBOX is a generalized process. From another perspective, XBox is a higher level of abstraction design, which can be applied to more scenarios. There are very few special things created for each specific game. almost none.

It is precisely because it does not have those special details that developers on this platform can fill in the details and enable the platform to adapt to various needs.

When we look at the development of the blockchain industry, the process of “Bitcoin” and “Ethereum” is also the same process.

What does “Bitcoin” want to do?

From the white paper and the title, we can see that the initial purpose was to realize a peer-to-peer payment system. This is a system with a very clear single purpose, so its system design is also done around this purpose.

In the era before the emergence of Ethereum, if everyone still has an impression, we want people all over the world to see that the underlying technology of “Bitcoin” is very valuable, whether it is a blockchain or a distributed ledger.

What can you do when we want to do other things with this technology? All you can do is the Focus “Bitcoin” code, not what you can do with the “Bitcoin” code.

But the emergence of Ethereum has changed all of this. Ethereum said that we don’t need to be so troublesome. We can turn Bitcoin and blockchain into a more general system. We need to find the commonalities of application requirements that use blockchain technology. Create a platform, remove the special design for payment services, but find out all kinds of common needs, and design a platform for common needs.

Therefore, Ethereum has a virtual machine and a running environment. A variety of different applications can be constructed on Ethereum, such as payment, lending, games, and so on.

From “Bitcoin” to “Ethereum” is a generalized process.

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

In other words, Ethereum is actually a higher level of abstraction relative to “Bitcoin”, just like XBox compared to arcade machines.

If we follow this line of thinking, we can easily think of how we can do better. If we really want to make a blockchain that is different from the current generation, what will the next generation look like?

It may not be that the performance is better, but the abstraction should be higher.

How to make the system a higher level of abstraction?

Recall the definition just now, to find the special design and special details inside, if it is not a common thing, cut it off, and find a way to turn it into a more general design.

What are the special designs in today’s blockchain system? I found several aspects to share with you:

Specific account system

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

Blockchain is a system of interaction between people and assets. Since there are people and users, you have to create an account and an identity for each user to represent it. How to verify that the account belongs to someone? What is the data model inside the account? These things are hard-coded in today’s blockchain system, and are selected by the blockchain designer to help developers and users. As a user or developer, you have no right to replace it.

Take the verification in the account as an example. Whether it is Bitcoin or Ethereum, it is specified by the system. Once you want to send a request to the system and construct a transaction, you must use a specific cryptographic algorithm to sign, which is mandatory the design of. As a blockchain user, you have no way to change it, it is hard-coded in the system.

However, such a mandatory design will actually cause many problems, the most obvious of which is that the threshold for blockchain users is very high. The specific choices made due to historical reasons are different from the cryptographic algorithms used in many Internet scenarios today. For example, every mobile phone now has a security chip. It is the most convenient and safest to use the security chip to keep the private key. However, the security chip may use the R1 or RSA algorithm instead of the encryption algorithm selected by the blockchain. , The incompatibility will cause you to use mnemonic phrase technology to re-establish the account system instead of using the existing account system.

Now, what other account systems are there? There are actually many mailboxes, face recognition, biometric recognition, etc., but these are not compatible with the blockchain account system, which is an obstacle caused by a specific design.

Special cryptographic algorithm

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

For example, today I want to develop an application on a certain blockchain, and I don’t want to use the limited options specified by this platform. What should I do? You can’t do anything, you can’t do anything.

In Ethereum, Precompiles is a specific cryptographic algorithm written in the EVM virtual machine. If you don’t want to use this algorithm, you may be able to re-implement one with Solidity, but the efficiency is very low, because the EVM itself is also very inefficient. .

What problems does this cause? The cryptographic algorithm is actually a standard. Different countries have different cryptographic algorithm standards. The United States has the US Secret, and China has the National Secret, but the choice of blockchain is not any standard. This means that when the application of blockchain wants to go to the real scene, it is difficult to be compatible with existing standards, which is actually an obstacle to the promotion of blockchain technology.

Runtime environment

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

Now, almost all blockchain platforms support smart contracts. Smart contracts need to run in an appropriate environment, which may include virtual machines and state models. The runtime environment itself can also be divided into calculation time, runtime, verification runtime, etc., each with many different options. For example, the virtual machine can use EVM or RISC-V virtual machine. But for every blockchain design seen today, the blockchain designer helped the developer to select a specific combination. Developers cannot freely choose different options, which will bring barriers to developers. In order to enter the blockchain system, developers may need to learn a set of things completely different from those used in today’s work. In our opinion, this limitation is also very large.

Not only does it have learning costs for developers, it also has an impact on blockchain performance and security. All in all, the people of the blockchain system have made choices for you, and you can’t make other choices as long as you use the blockchain system.

The above three aspects are the relatively large abstraction levels of the blockchain that can be seen now, and we also hope to solve these problems. The solution is also very simple. Now that the problem is found, it is necessary to abstract the account, cryptography, and runtime to give users and developers more choices.

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

How did we do it? At the account abstraction layer, Nervos introduced a new data account model-Cell model. What kind of effect can be achieved with account abstraction? Applications on abstract accounts can be used by users in different places.

For example, if you are an ordinary Internet user, you only have a mailbox, you can directly use the application on the blockchain, you don’t need to download a new wallet entry, and you don’t need to set your private key or mnemonic. You can Just use the email as an account directly.

We can also use the mobile phone’s security chip to help you create an account safely and conveniently. If your mobile phone chip is associated with face recognition, you can directly use face recognition to control your account. During the whole process, you don’t need to learn anything special about the blockchain, just use your existing things.

There are already many applications on Nervos doing this. An application like Unipass is an e-mail-based decentralized blockchain account system, and an application like DAS also uses the characteristics of abstract accounts to make the Internet Users, Ethereum users, and EOS users can all directly operate the application, not only Nervos users can operate the application. This is interoperability.

How to do cryptographic abstraction?

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

The core of cryptographic abstraction is the need for very efficient virtual machines. The efficient virtual machine we implemented by ourselves is CKB-VM, which uses open instruction-level RISC-V. Thanks to the instruction-level features of RISC-V, CKB-VM allows developers to use C and Rust to implement cryptographic algorithms , The benefit is not only high efficiency, and many mature cryptographic algorithm implementations can be directly moved to the blockchain to run, which means they can be moved to Nervos to run.

The implementation of cryptographic algorithms is actually very difficult. If we implement cryptographic algorithms first, then it will be very easy to make mistakes. How to judge whether the implementation of a cryptographic algorithm is secure? The only best test is its maturity and time of use. The more people use it, the longer it is used, the safer it will be.

The advantage of being able to directly transplant the cryptography made by C and Rust is that there is no need to re-implement a set. If a set is re-implemented with Solidity, then security is worth considering, because it is a new thing, there may be bugs in it, and it takes time Correction.

Through the high-performance EVM and the EVM that supports C and Rust, most of the current cryptographic algorithms can be reused efficiently, because most of the existing cryptographic algorithms are implemented in C and Rust.

How to do abstraction at runtime?

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

For developers, developers will not be forced to use a certain language for development, but can use languages ​​that they are familiar with everyday, whether it is JAVAscript, Ruby, Rust, C, etc., can be Used for development. Moreover, when writing a smart contract, the internal memory layout and data layout of the smart contract are not prescribed, but there are very flexible choices. This is the goal we want to achieve.

Nervos is actually improving the blockchain in this direction. What we want to create may not be a faster blockchain, but a blockchain with a higher level of abstraction. But when the level of abstraction can be higher, we can do more things, and whether the performance or throughput is good, it will be a side effect of the higher level of abstraction.

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

When the level of abstraction is higher, we will move more things out of the chain, or move to Layer 2 as Vitalik said this morning. The separation of Layer 1 and Layer 2, or the separation of calculation and verification, is a side effect of the abstraction change level, so we should pursue the abstraction level change instead of directly pursuing the performance change.

Nervos Xie Hanjian: In-depth discussion on the abstraction and evolution of blockchain

It is as if we have changed from XBOX to PC. Although XBOX is a general platform, it still gives people a lot of restrictions. We can play different games for it, but we cannot change its hardware. The PC has also removed this restriction, and has also done a more general treatment at the hardware layer. The PC allows people to change the graphics card, CPU, memory, motherboard, and hard disk. So PC is a more general system, it is a standard. From this perspective, PC is a higher level of abstraction system than XBOX. It can do higher things, meet more needs of users, and bring more convenience to developers.

If you are more interested in Nervos , you can visit the official website of Nervos. This is the end of my speech. Thank you!

Adblock test (Why?)

Disclaimer: does not endorse any content or product on this page. While we aim at providing you all important information that we could obtain, readers should do their own research before taking any actions related to the company and carry full responsibility for their decisions, nor can this article be considered as investment advice or recommendations. Every investment and trading move involves risk, you should conduct your own research when making a decision.