BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

From the paradigm shift from EVM to Wasm, why does Polkadot become an evergreen tree of the public chain?

Polkadot生态研究院
特邀专栏作者
This article is about 7610 words, reading the full article takes about 11 minutes
EVM and Wasm VM are two commonly used virtual machines for blockchains. Almost all popular blockchains are more or less compatible with EVM, but there are also many emerging public chains that will use Wasm technology. What will happen behind this? What
AI Summary
Expand
EVM and Wasm VM are two commonly used virtual machines for blockchains. Almost all popular blockchains are more or less compatible with EVM, but there are also many emerging public chains that will use Wasm technology. What will happen behind this? What

Produced by the Polkadot Ecological Research Institute, it must be a boutique (the article is very long, it is recommended to collect it first and then read it)

This article is jointly produced by Patract Labs and the Polkadot Ecological Research Institute. This article will involve some technical terms, but we will explain it in an easy-to-understand way. You can read the important explanations as appropriate.

background

background

If time goes back to 2017, people will still remember what happened in the blockchain field that year, especially the explosion in the public chain field. It is not enough to describe the tens of thousands of projects that claim to be public chains that year. However, later stories tell us that there are only a handful of public chains that can truly cross the river of history. As a result, the competition of the public chain seems to have changed from "thousands of arrows all at once" to "ninety-nine return to one", and only Ethereum is left to carry the ecological banner of the public chain.

And today, 4 years later, we set the time back to the beginning of 2021. At that time, the public chain ecology no longer had the so-called "Ethereum killer". Everyone focused on Ethereum, whether it was DeFi or NFT. Both are derived from the Ethereum ecosystem. However, the popularity of Ethereum's ecological projects has also squeezed out the performance of Ethereum. The old problems of Ethereum's slow transfers and high gas fees have reappeared.

As a result, some new solutions have gradually surfaced. The Binance Smart Chain BSC stands out first. By being compatible with EVM, it quickly reproduces the mature applications of Ethereum on BSC, and quickly supports Binance Exchange. It has grown and become the public chain with the second largest lock-up volume. Then Polygon, which is positioned as a Layer 2 aggregator, and Solana, a high-performance public chain, started to make efforts in April, and the probability of public chains rising is getting higher and higher.

In the past August, we once again witnessed the outbreak of the public chain tide, and public chains such as Avalanche, Fantom, and Celo ushered in huge growth one after another.

The reason why these public chains are suddenly excited, in addition to the hype in the market and the incentive mechanism of the public chain, is that they almost all adopt or are compatible with the EVM (Ethereum Virtual Machine) "Ethereum Virtual Machine" (except Solana), so that they can Rapid use of smart contracts and effective compatibility enable rapid expansion of the ecology, so EVM has laid the foundation for some public chain explosions.

Although EVM is currently considered a relatively complete mechanism in the blockchain field, its limitations and timeliness also appear to be "outdated" with the development of blockchain, and the Wasm contract, which is an upgraded version of the EVM contract, has begun to attract everyone's attention.

We have also seen that the founder of Ethereum "V God" has long stated that Ethereum 2.0 will be upgraded to a Wasm contract (eWASM) to meet more development needs. But now, the development of Wasm contracts has taken a certain shape, especially in the Polkadot ecology, there are more acceptors and adopters, and they seem to see the distant future...

A Quick Look at EVM and Wasm

EVM and Wasm VM are two commonly used virtual machines for blockchains. Almost all popular blockchains are more or less compatible with EVM, but there are also many emerging public chains that will use Wasm technology. What will happen behind this? What kind of change? To understand these clearly, we need to have a brief understanding of EVM and Wasm.

1. What is EVM?

According to a more standard definition, EVM is a virtual machine specially developed for Ethereum clients, mainly used to run smart contract codes on the Ethereum network. It is essentially a virtual machine (VM), but lighter. A virtual machine can be simply understood as a virtual computer, so we can write programs and run programs on this computer.

Applying the virtual machine (VM) to Ethereum, we have the well-known EVM (Ethereum Virtual Machine, Ethereum Virtual Machine). Execute automatically. At the same time, with the help of the smart contract function of Ethereum, we can successfully complete various modular tasks on the blockchain network.

In layman's terms, with the help of Ethereum's virtual machine, we can map real-world contracts or contracts to the blockchain, so that when the demand (or condition) occurs, the transaction or transfer is automatically completed, avoiding contract violations, it can be said Only with the Ethereum of the virtual machine can the subsequent development of Ethereum, and it will bring more applications to the blockchain, whether it is DeFi, NFT or other alliance chain functions.

2. What is Wasm?

The full name of Wasm is WebAssembly, a binary instruction format that runs on a stack-based virtual machine. These codes can be C, C++ or Rust, etc. They will be compiled into your browser and run on your CPU in a near-native Speed ​​runs, and these codes are in the form of binary files. Wasm's development teams come from Mozilla, Google, Microsoft, Apple and other companies, and the standards are formulated by the W3C organization.

Wasm was originally a virtual machine designed for browsers, but after more and more developers use Wasm, they have gradually expanded the usage scenarios of Wasm, making Wasm one of the most common formats currently.

In the field of blockchain, its host independence, security sandbox and overall simplicity make it an ideal runtime for smart contracts. Additionally, it allows contracts to be developed using a number of modern programming languages ​​(Rust, C++, JavaScript, etc.). The Ethereum team has been piloting eWasm, a Wasm-based contract engine, and plans to officially release it sometime in 2021.

Why is it said that EVM will paradigm shift to Wasm

1. What is a paradigm shift?

Paradigm Shift, also known as "paradigm shift", was first proposed by the famous American philosopher of science Thomas S. Kuhn (Thomas S. Kuhn), who believed that "paradigm" refers to a specific scientific community engaged in a certain type of scientific activities The recognized model that must be followed, which includes a shared world view, basic theories, paradigms, methods, means, standards, and everything related to scientific research. And this concept can also be derived to other levels, such as the economic level, corporate management level, business level and so on.

Paradigm transformation is the process of transforming a long-established and recognized pattern A into another pattern B. For example, the use of bp pagers is converted to the use of mobile phones, text messages are converted to WeChat, DVDs are converted to streaming media, and so on.

Feedback to the current progress of human science, each of our great scientific and technological progress is not an accident, it can even be said to be a kind of necessity, the directivity of these technologies is described by Thomas, "the development of science is made by The process by which a series of new theories replace the old ones", and the same is true for blockchains.

EVM has gone through 7 years since the birth of Ethereum. Compared with the blockchain world back then, it has made a huge leap forward. According to the path of paradigm shift, Ethereum is about to enter the 2.0 moment, so EVM also urgently needs to be updated and iterated. EVM is still designed a few years ago, but new technologies are developing rapidly. EVM seems to be turning to Wasm, which is also the result of paradigm shift.

2. What advantages does Wasm have over EVM?

The Ethereum Foundation has stated many times at Devcon that it intends to transition from EVM to Wasm, but the huge contract size that has already been launched cannot support deep-seated changes, and the ecology is also going further and further away from this temporary solution. The advantages of choosing Wasm as a virtual machine for smart contracts are as follows:

1. Completely win the EVM virtual machine. Compared with EVM, which requires developers to pre-compile and has higher programming costs, the structure, instruction completeness, and execution efficiency of the Wasm virtual machine are far superior to those of the EVM virtual machine, and will become a new engine for contract development.

2. Fast execution speed. Wasm has a complete set of semantics, and has a compact binary format with a small size, which makes the efficiency of Wasm bytecode runtime close to that of local machine code, which is 1 to 2 orders of magnitude higher than the performance of EVM. It will be upgraded to a faster JIT virtual machine.

3. Low transaction fees. The faster Wasm virtual machine leads to a substantial increase in transaction throughput, and the cost of contract deployment and transaction can also be greatly reduced. It can be said that the Wasm contract has solved the current problems of high transaction fees and transaction congestion on Ethereum.

4. Wide range of contract languages. Wasm expands the language series available to smart contract developers, and supports the use of any Wasm high-level language (such as Rust, C++, JavaScript, etc.) to develop and write complex business logic, which means that you can write smart contracts in any language you are familiar with, including The most mature Rust-based ink!, or AssemblyScript-based Ask!, etc.

3. The reason why EVM will paradigm shift to Wasm

Although we have just briefly stated that Wasm has many advantages over EVM at the technical level, the reason for the paradigm shift from EVM to Wasm is not only this aspect.

As the inventor of EVM and the founder of Polkadot, Dr. Gavin has enough voice on this issue. When working on Polkadot, Gavin did not follow the EVM he invented, but chose Wasm. The reason behind this can well answer this question.

Although it seems that Ethereum's EVM has a history of six or seven years, and many public chains are adopting or compatible with EVM, EVM may not be the final answer.

When Dr. Gavin chose to leave Ethereum to start a new project, he had many choices. But for Dr. Gavin, if he just makes a "copycat version" of another project, or just iterates a little bit, increases the transaction throughput, or creates a slightly improved language, it is not enough. his.

Therefore, Gavin did not want to go the old way in the past, he chose a road that no one has traveled, and innovatively made an infrastructure project that is lower than the public chain, and this is Polkadot.

When doing Polkadot, the reason for choosing Wasm can also be seen from his attitude towards EVM: "Many people are already using EVM, so it is very important to support these legacy protocols and legacy languages." Relying on old technology for a living, but also looking to the new future, "start thinking about what the next-generation tools are, and for me that is using WebAssembly as a smart contract."

In fact, many of Wasm's own advantages match Polkadot very well. For example, blockchains require determinism for reliable state transition updates across all nodes in a peer-to-peer network without forcing each node to run the exact same hardware. Wasm is well suited for reliability across potentially different sets of machines. Wasm is both efficient and fast, and this efficiency means it can be uploaded on-chain as a blob of code without too much state bloat while maintaining its ability to execute at near-native speed. Wasm also supports Polkadot's fork-free upgrade, which also provides Polkadot with another powerful tool.

Gavin, who knows EVM best, chose Wasm in this way, and it is the same for other public chains. After all, the birth of EVM also has a historical background. One is that the development of the Internet was relatively early at that time, and there were not many high-quality technologies that could be selected. Wasm had not yet been born at that time (Wasm was born in June 2015), so Dr. Gavin When they were still working as the CTO of Ethereum, when designing Ethereum, they tried not to stray too far from what the world was familiar with at the time, which was Bitcoin. The problem with the EVM is that it is a very opinionated design because it derives from an already very opinionated design, which is Bitcoin's scripting design.

It can also be seen from this that EVM is a product of the times, and it is also subject to the background of the times and technology at that time, and it is not the optimal solution. As Wasm becomes bigger and stronger in the Internet field and gradually improves, technology experts in the blockchain field are also trying to apply this more excellent technology to the blockchain. This is why relatively new public chains will support Wasm more, and then connect to EVM in a compatible form.

How EVM may be converted to Wasm

1. How will it be transformed for EVM ecology such as Ethereum?

First of all, let's see how Ethereum will migrate from EVM to eWASM, and this cannot be avoided is to discuss the update of Ethereum 2.0. According to the progress announced by the Ethereum development team, with the realization of Ethereum 2.0, eWASM will be deployed to The new Ethereum usage environment for faster, easier and more inclusive development.

Of course, ecology like EOS has already entered the embrace of Wasm, and public chains like Tron and Cardano are also on the way to Wasm.

secondary title

2. How is the conversion for Polkadot supported by both EVM and Wasm?

Polkadot natively supports Wasm technology, and then they are very familiar with Ethereum and they naturally understand that EVM still has many advantages. For example, the EVM ecosystem that has formed a network effect has many developers and applications. These are valuable resources and must be properly managed. use it.

In 2020, Parity developed the Substrate module compatible with Ethereum EVM and the compatibility layer Frontier, allowing EVM smart contracts to interact with other Substrate modules. Users can also directly deploy Solidity smart contracts on Substrate, while using Web3 RPC tools (such as Metamask and Truffle) to interact with on-chain applications.

Therefore, the Substrate-based chain on Polkadot can have two modules at the same time, one is the EVM-Contracts module (used to execute the original Solidity/EVM code), and the other is the Substrate-Contracts module (used to execute Solidity/Wasm or Ink! Wasm code). The two are interoperable, and messages can even be published to a separate Parity-Ethereum chain that is bridged, or if deployed as a parachain, it can be spread to the broader Polkadot community including the Ethereum mainnet.

Compatible and interactive, Polkadot can successfully complete the transition and iteration from EVM to Wasm.

3. How does Patract accelerate the transition from EVM to Wasm

Patract Labs(https://patract.io/zh)https://patract.io/zh) is a laboratory focused on Polkadot Wasm contract technology. Currently supported by the Polkadot Council and the Treasury, it has successively launched dozens of free full-set Wasm contracts with strong applicability and advanced technology for developers Development tools and services, including contract test chain, AS contract language, contract development scaffolding, contract running sandbox, Polkadot API service, zero-knowledge proof support, contract library, monitoring platform, SDK, IDE, etc.

It is a laboratory focusing on Polkadot Wasm contract technology. Currently supported by the Polkadot Council and the Treasury, it has successively launched dozens of free full-set Wasm contract development tools and services with strong applicability and advanced technology for developers, including contract test chain, AS contract language, contract development scaffolding, contract running sandbox, Polkadot API service, zero-knowledge proof support, contract library, monitoring platform, SDK, IDE, etc.https://open.patract.io)。https://open.patract.io). Through this platform, excellent parachains or application teams in the Polkadot ecosystem who are willing to join the Wasm contract ecosystem will be brought together to demonstrate the specific practices and technological innovations of their Wasm contracts, and provide market and technical support.

Through this platform, excellent parachains or application teams in the Polkadot ecosystem who are willing to join the Wasm contract ecosystem will be brought together to demonstrate the specific practices and technological innovations of their Wasm contracts, and provide market and technical support.

The establishment of Patract Open Platform is not only to provide underlying facilities and technical support, Patract Labs will also use Wasm contract technology to further explore the infinite possibilities of the Polkadot ecosystem in the future. For example, Ethereum contracts use the EVM virtual machine and Solidity language, which makes it impossible to develop complex contracts at low cost. If contracts with high frequency and complexity are executed, transaction costs will increase significantly and execution efficiency will be low. Big limitations. In this regard, Patract Open Platform will explore from three directions: contract model, contract standard (similar to ERC20 business standard), and Runtime interface customization.

Why is it said that Polkadot will be an evergreen tree of the public chain

1. The unique function of Polkadot establishes its position

The role of Polkadot determines that it is not a competition with general public chains, but a better underlying support for cross-chain interactions for each public chain. For example, the well-known public chains such as Bitcoin, Ethereum, BSC, Cosmos, Near, etc., can all be connected to Polkadot through bridges or parachains.

And these projects represent public chains represented by different technologies in different periods, which has verified that Polkadot is a long-term infrastructure that can accompany blockchain technology changes.

Nowadays, various public chains are contending, and some Cosmos-based application chains such as Terra are also shining. We can already make it clear that the future of blockchain must be multi-chain, so the future development is destined to be "iron Polkadot" , a running public chain".

2. Polkadot’s natural advantages

The innovative design of Polkadot enables it to obtain features that other public chains do not have in terms of upgrading and iterating the underlying technology.

As we all know, the upgrade of the public chain must be achieved through hard forks, and Polkadot is positioned as a lower-level meta-protocol from the beginning of the design, so Polkadot upgrades do not require hard forks. This makes it very easy for Polkadot to upgrade iteratively, and it is also more conducive to the evolution of Polkadot itself.

In addition, there is an epoch-making invention behind Polkadot - the Substrate framework that can issue a chain with one click. Based on this framework, a blockchain can be quickly built. In this framework, you can add many ready-made functional modules to your own. In the blockchain, it is as simple as assembling a computer. Among them are modules that support EVM, so in the same way, if there is a newer technology that needs to be iterated, Polkadot can also integrate such technology into the Substrate framework, so that its own ecology can also be compatible with new technologies.

This is one of the reasons why Polkadot can always maintain the most cutting-edge technology, and it is also one of the reasons why we say that Polkadot will be an evergreen tree.

3. Polkadot will have experience in iterative technology

Polkadot is compatible with EVM and supports Wasm, and many ecological projects of Polkadot also have both. At present, Polkadot already has a complete set of solutions for switching from EVM to Wasm, which means that Polkadot has explored a path that can successfully iterate from the old technology EVM to the new technology Wasm. Then, if there is a more advanced technology than Wasm in the future, Polkadot can reproduce the paradigm shift from EVM to Wasm, so that Wasm can be converted to the new technology.

first level title

postscript

postscript

Although Polkadot is an evergreen tree, there is no need to worry too much about technical iteration, but the Polkadot ecology is very huge, and Polkadot officials alone are definitely not enough. Therefore, many organizations that are working hard to build around the Polkadot ecology are using their own methods to accelerate the development of the Polkadot ecology.

For example, in order for Polkadot to have more parachain projects born, a basic node environment specially prepared for developers is essential. Patract launched a Jupiter parachain test network and launched a parallel chain in August. Chain-to-chain transfer can convert Westend (Polkadot test network) and Jupiter tokens to each other, so as to better allow developers to test.

In addition, Patract also developed the JavaScript-based automated testing environment Redspot development scaffolding. The Europa contract sandbox environment has officially entered the production and availability stage, and has entered long-term maintenance in line with Redspot. The official website of the Elara API service has been developed, and Elara v1.0 supports Statemine, Karura, MoonRiver, and Bifrost for parachain nodes. Developers can build regular DAPPs based on the Metis contract standard library. Ask! The contract language can already be used in an experimental environment to write complex contracts such as ERC20 and ERC721 through AssemblyScript.

*The information provided by the Polkadot Ecological Research Institute does not represent any investment hints. The published articles only represent personal opinions and are for reference only. Since there are no policies and regulations related to digital assets in China, users in mainland China are requested to pay close attention to the development of Crypto.

*The information provided by the Polkadot Ecological Research Institute does not represent any investment hints. The published articles only represent personal opinions and are for reference only. Since there are no policies and regulations related to digital assets in China, users in mainland China are requested to pay close attention to the development of Crypto.

In view of the endless emergence of Polkadot ecological projects, but the inferior projects and scam projects are full of them, it is worthy of vigilance. On the other hand, it is difficult for groups only on the Polkadot project side to understand the whole picture of the entire ecological development of Polkadot, and miss many opportunities. Therefore, we decided to establish a Polkadot ecological group, which can openly discuss all Polkadot ecological projects. Everyone can objectively share their views on each project, understand the development of each Polkadot project, and exchange information to seize opportunities together.

In view of the endless emergence of Polkadot ecological projects, but the inferior projects and scam projects are full of them, it is worthy of vigilance. On the other hand, it is difficult for groups only on the Polkadot project side to understand the whole picture of the entire ecological development of Polkadot, and miss many opportunities. Therefore, we decided to establish a Polkadot ecological group, which can openly discuss all Polkadot ecological projects. Everyone can objectively share their views on each project, understand the development of each Polkadot project, and exchange information to seize opportunities together."Pay attention to the official account"Polkadot Ecological Research Institute

ETH
Polkadot
public chain
Welcome to Join Odaily Official Community