On October 26, the 7th Blockchain Global Summit hosted by Wanxiang Blockchain Labs was held in Shanghai. Nervos network architect Xie Hanjian said in a sharing titled "Blockchain Abstraction and Evolution" that governance and Abstraction is a new challenge for blockchains. Ethereum has changed everything. It generalizes blockchain technology. It looks for applications that utilize blockchain technology, discovers their commonalities, and then creates a platform for various applications, scenarios, and needs. Various applications can be created on the Internet, including payment, games, etc. Ethereum is a system with a higher level of abstraction, and the future blockchain will not pursue better performance, but a higher level of abstraction and a more general design. He believes that there are three problems in the abstract level of the blockchain, such as a specific account system, a special cryptographic algorithm, and a special runtime. The blockchain should pursue a higher level of abstraction, and performance is a by-product.
The following is the full text of the speech:
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 blockchain?
I don’t know if you have read such a 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 for five or six years. If you review some previous ideas, you can see that the thinking at that time may not be so correct.
A few years ago, when everyone wanted to build a new blockchain, they thought, "If I solve the performance problem of the blockchain, will I create a new generation of systems that can beat Ethereum, and then what can I do? How is it?" and so on.
However, the development of the blockchain industry in the past few years has falsified this idea, because we can see that new blockchains have come out, and their performance is indeed very good, but everyone still thinks that we are still in Ethereum. era, did not enter the next era, and did not feel the era from " Bitcoin " to " Ethereum ", this feeling is not there, although today's new blockchain has very good performance and can process Thousands of transactions.
Some say 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 govern such an open P2P autonomous project. Governance is indeed a difficult problem.
But I want to say that this is not the only problem, so "Abstraction" and "Abstraction" are also very important.
The issue discussed in "governance" is - if we as a community can decide whether the blockchain platform should do something, then the "abstract" level of the blockchain is to determine what can be moved to the table to be governed and Discuss, discuss what to do or what not to do.
Therefore, I think "abstraction" is also a very important challenge for new blockchains.
What is "abstract"?
The word itself is abstract.
Abstraction itself is a relatively technical word, and there are two explanations, we only need to care about the first one: the so-called abstraction is a process, we remove the particularity from a system, and then create generality and universality from the system.
This is a generalization process. By removing special designs and finding out the commonality, the system can become more general and applicable to more scenarios.
This explanation may still be very abstract. Everyone should remember that the key word is to get rid of "specificity", remove "specificity" from the system, find more common "general" things in the system and put them in the design to create " general".
Explain with a not-so-blockchain example.
You may have played game consoles, at least when I was a child, I would play large so-called arcade machines in arcades. If you know such a machine, you will know that each machine actually corresponds to a game. For an arcade machine, the system design is an integrated design from software to hardware. All designs are designed around 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 game industry has developed to the point where the most popular thing today is no longer arcade machines, but more general game platforms like XBox.
XBox is a general design, you can design various 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 general process. From another perspective, XBox is a design with a higher level of abstraction, which can be applied to more scenarios. There are very few special things built 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 so that the platform can adapt to various needs.
When we examine the development of the blockchain industry, the process of examining "Bitcoin" and "Ethereum" is also the same.
What does "Bitcoin" want to do?
From the white paper and the title, we can see that the original 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 based on this purpose.
In the era before the emergence of Ethereum, if you still have 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 use this technology to do other things? All you can do is to focus on the "Bitcoin" code, not to use the "Bitcoin" code to do anything.
But the emergence of Ethereum has changed all 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 commonality of application requirements that use blockchain technology. Create a platform to remove the special design that is only for payment services, but find out a variety of common needs and design a platform for common needs.
Therefore, Ethereum has a virtual machine and an operating environment, and various applications can be constructed on Ethereum, such as payment, lending, games, and so on.
From "Bitcoin" to "Ethereum" is a generalization process.
In other words, Ethereum is actually a higher level of abstraction than "Bitcoin", just like XBox is compared to arcades.
If we follow this line of thinking, we can easily think of how to 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 better performance, it should be higher abstraction.
How to make the system a higher level of abstraction?
Recalling the definition just now, it is necessary 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.
In today's blockchain system, what are the special designs? I found a few things to share with you:
(1) Specific account system
Blockchain is a system of interaction between people and assets. Since there are people and users in it, you need 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 blockchain designers 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 it. This is mandatory. the design of. As a blockchain user, you have no way to change it, it's hard-coded into 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 the mnemonic technology to re-establish the account system instead of using the existing account system.
Now, what are the other account systems? There are actually many mailboxes, face recognition, biometric recognition, etc., but these are not compatible with the blockchain account system, which is an obstacle brought about by a specific design.
(2) Special cryptographic algorithm
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, there is a Precompiles that 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 reimplement 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 also has secrets, and China has national secrets, but the choice of blockchain is not any kind of standard. This means that when the application of the blockchain wants to go to the real scene, it is difficult to be compatible with the existing standards, which is actually an obstacle to the promotion of blockchain technology.
(3) Runtime environment
Now, almost all blockchain platforms support smart contracts, and 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 compute time, runtime, verification runtime, etc., each with many different options. For example, virtual machines can use EVM, or RISC-V virtual machines, etc. But every blockchain design seen today is a specific combination selected by the blockchain designer for the developer, and the developer cannot freely choose different options, which will bring a threshold for the developer. In order to enter the blockchain system, developers may need to learn a set of things that are completely different from those used in today's work. In our opinion, this limitation is also very large.
Not only is there a learning cost for developers, but it also has an impact on blockchain performance and security. All in all, the blockchain system creator has made a choice for you, and as long as you use the blockchain system, you can no longer make other choices.
The above three aspects are relatively big problems in the abstract level of the blockchain that can be seen now, and we also hope to solve these problems. The way to solve it is also very simple. Now that the problem is found, it is necessary to abstract the account, abstract the cryptography, and abstract the runtime to give users and developers more choices.
How do we do it? At the account abstraction layer, Nervos introduced a new data account model - Cell model. With account abstraction, what kind of effects can be achieved? Applications on abstract accounts can be used by users in different places.
For example, if you are an ordinary Internet user and you only have an email address, you can directly use applications 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 your email address as your account.
We can also use the security chip of the mobile phone to help you set up an account safely and conveniently. If your mobile phone chip is associated with face recognition, you can directly use face recognition to control the account. During the whole process, you don't need to learn anything special about the blockchain, just use what you have.
There are already many applications on Nervos that are doing this. Applications like Unipass are a decentralized blockchain account system based on e-mail, and applications like DAS also use the characteristics of abstract accounts to make the Internet Users, Ethereum users, and EOS users can directly operate applications, not only Nervos users can operate applications, which is interoperability.
How to do cryptographic abstraction?
At the heart of cryptographic abstraction is the need for very efficient virtual machines. Our self-implemented high-efficiency virtual machine is CKB-VM, which uses open instruction level RISC-V. Thanks to the characteristics of RISC-V instruction level, CKB-VM allows developers to use C and Rust to implement cryptographic algorithms. , the benefit is not only high efficiency, but many mature cryptographic algorithm implementations can be directly moved to the blockchain to run, that is to say, they can be moved to Nervos to run.
The implementation of cryptographic algorithms is actually very difficult. If we implement cryptographic algorithms first, it will be easy to make mistakes. How to judge whether the implementation of cryptographic algorithm is safe? The only best test standard is its maturity and use time. 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 done by C and Rust is that you don’t need to reimplement one set. If you use Solidity to reimplement one set, then the security is worth considering, because it is a new thing, there may be bugs in it, and it will take 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?
For developers, developers will not be forced to use a certain language for development, but can use the language they are already familiar with for development, whether it is JAVAscript, Ruby, Rust, C, etc., can be used by Used for development. Moreover, when writing a smart contract, the internal memory layout and data layout of the smart contract are not prescribed, but can be chosen flexibly, which is what 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 abstraction level can be made higher, we can do more things, whether it is performance or throughput, it will be a side effect of the higher abstraction level.
When the abstraction level 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 level of abstraction change, so what we should pursue is the change of the abstraction level, rather than directly pursuing the change of performance.
It’s 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 make different games for it, but we cannot change its hardware. PC has also removed this limitation, and has also done more general processing at the hardware level. PC allows people to change graphics cards, CPUs, memory, motherboards, and hard drives. So the PC is a more generalized system, it's a standard. From this perspective, PC is a system with a higher abstraction level than XBOX, capable of doing higher things, meeting more needs of users, and bringing more convenience to developers.