7

What is the Ethereum Virtual Machine?

How does it contrast to the Ethereum World Computer?

The description of the EVM tag says:

EVM is the Ethereum Virtual Machine, the protected, distributed "sandbox area" (virtual machine) where contract execution occurs, replicated on every node in the network

Am I correctly inferring that code execution is repeated on all nodes? If so, why is only the miner compensated with gas?

5

The Ethereum Virtual Machine (EVM) is the computer that all full nodes in the Ethereum network agree to run. When there is code / data on the blockchain, consensus is needed to agree on what that code does. Everyone agrees on how the EVM should behave, and everyone has the same data on the blockchain, so everyone will compute the same answers. From this perspective, it looks like a single World Computer leading to that description.

Not all nodes perform the code execution. There are different types of nodes and light clients, such as those on mobile or devices with less resources, do not perform all the code execution. However, this means that light clients need to place trust on some service and slightly more vulnerable to getting deceived.

All full nodes perform the code execution for their own security. By doing this, full nodes can verify the computation result on their own, and they do not have reliance on some service. So instead of why is the miner the only node that gets the block reward, it's more about why do other nodes decide to perform the computation (or not).

1

Here is a perfect and complete answer to your question. The answer was big enough so I wrote an article. I hope that it will help a lot of people.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.