Three minutes to understand what is the Ethereum virtual machine EVM: three major functions and their significance
Produced | Vernacular Blockchain (ID: hellobtc)
Produced | Vernacular Blockchain (ID: hellobtc)
Earlier, Optimism announced that it will be upgraded to be fully compatible with EVM. Developers can use Solidity smart contracts to directly deploy tools running on Ethereum on Layer 2, which means that the scalability of the Ethereum network has further increased.
first level title
01
What is the Ethereum Virtual Machine?
Students majoring in computer science should be familiar with "virtual machine". "Virtual machine" refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
In layman's terms, a virtual machine is a virtual machine that we have simulated through software that is exactly the same as our personal computer, and it has the same software and hardware resources as an actual physical computer.
After entering the virtual system, all our daily operations can be carried out in this brand new and independent virtual system, where software can be installed and run independently, data can be saved, and so on.
In this way, we can toss in the virtual machine to our heart's content, and we are not afraid of various viruses and attacks. At worst, reinstalling the virtual machine will not have any impact on the real system.

Just like the six-eared macaque in "Journey to the West" has the same appearance as Monkey King, and both have the ability to subdue demons and eliminate demons, but they are independent individuals. Even after the six-eared macaque is killed, it will not have any impact on Monkey King himself.
We know that the Bitcoin network is like a huge and real-time updated distributed ledger. Computers anywhere in the world can connect to the Bitcoin system through the Internet. It has the characteristics of decentralization, non-tamperability, and openness and transparency.
There is no virtual machine in this network, and the main function of Bitcoin is to record and store transaction data on the chain at any time.
first level title
02
What is the use of the Ethereum Virtual Machine?
Compared with Bitcoin, which is regarded as a distributed ledger, Ethereum is committed to becoming a "next-generation smart contract and decentralized application platform", which can be regarded as a distributed computing platform that can run programs.
Vitalik also envisions it as a decentralized "world computer". As a computer, it needs to have computing, storage, execution and other functions.
Therefore, in addition to the basic data storage function in the Bitcoin network, Ethereum also needs to run various codes for calculation. The software or application compiled and interpreted by the Ethereum Virtual Machine (EVM) is a "smart contract".
Execute the contract and realize the transfer to the corresponding address.
Retrieve the value of the transfer and analyze the instructions of the contract.
Calculate Gas consumption (handling fee), and ensure that the address sending the transfer has enough Gas fee.
Execute the contract and realize the transfer to the corresponding address.
From the above workflow of the Ethereum Virtual Machine (EVM), we can see several functions of the EVM for Ethereum:
Ease of testing: In order to ensure the smooth execution of various "smart contracts", we need to create a safe operating environment for them, and the Ethereum Virtual Machine is a code operating environment.
As we said above, various operations in the virtual machine will not affect the host, any developer who wants to create a smart contract on the Ethereum virtual machine can test various applications on the virtual machine without occupying the resources of the main chain It is also not affected by other blockchains.
Increased security: Ethereum hosts various applications with powerful functions, and its logic is more complex, and developers are more prone to various loopholes. The Ethereum Virtual Machine is a completely independent sandbox, and the contract code can be completely isolated from the outside and run inside the EVM.
Not only can it prevent the entire main chain from being affected by criminals or programming errors by programmers, but it can also prevent physical devices running smart contracts from being attacked.
summary
03
summary
It can be seen that the Ethereum virtual machine plays an important role in the Ethereum blockchain, providing a technical basis for the realization of smart contracts, not only providing developers with an application testing environment as a whole, but also improving the performance of the Ethereum main chain to a certain extent. Security, stability.
However, it also has many defects that have been criticized. For example, the Solidity language commonly used by EVM lacks a standard library, the contract code does not support upgrades but only supports deployment, storage space fragmentation and maintenance, etc.


