1. What does the EVM do?
The EVM - Ethereum Virtual Machine - assists nodes in reading smart contracts and then communicating the instructions for the CPU to operate. The EVM ensures that there is security for the node and there is no malicious code that will be dangerous to the CPU. It does this by encapsulating the contract and making sure it is safe when it translates it to the CPU. This is to protect the whole Ethereum network to make sure that nobody writes a smart contract that takes over the nodes and controls the computerâs CPUs, which could result in a massive disaster for the network as a collective, and each node running the contract. Essentially the EVM is crucial for network security and node safety.
2. What is the format of the instructions that the EVM can read?
Bytecode is the code format that the EVM can read. The instructions are most often written in the programming language called Solidity and then run through a compiler that translates it into Bytecode format that is then read by the EVM.
3. What is the relationship between the programming language Solidity and Bytecode?
Bytecode is the format that smart contract codes written in solidity are converted into when compiled. The EVM only reads Bytecode and it is a crucial language for the Ethereum network. Other languages such as Viper are now being used to construct smart contracts as well and they are also converted into Bytecode for the EVM.
4. Why canât Bitcoin run the same type of complex programs like Ethereum can?
Bitcoin uses a programming language called Script that allows for small programs to be written on its blockchain for things such as multi-signature transactions. However, these programs are very elementary compared to Ethereum smart contracts. Script is not a Turing Complete programming language. Solidity on the other hand is a Turing Complete language and allows you to program anything you want. Solidity contains loops while Script does not, and this makes a big difference in the programs that can be created using these languages. Bitcoin actually decided to use Script instead for this reason, to reduce spam and makes the network less congested so it can serve its purpose as money. Ethereum is the alternative that provides fully programmable money. This is the major difference between the two blockchains.
5. What is a Turing Complete programming language?
A Turing Complete programming language lets you program anything you want and has the ability to run loops which are short pieces of code that can tell the computer to run a code multiple times over and over again. In a non-Turing language, you must write each instruction for every repeat in code, unlike loops that let you use only one code for multiple executions.