Homework on EVM

  1. What does the EVM do?

Piece of code that ETH network computers are running. It reads and executes smart contracts and tells the CPU what to do.

  1. What is the format of the instructions that the EVM can read?

EVM Bytecode.

  1. What is the relationship between the programming language Solidity and Bytecode?

Solidity is a programming language. A program like Compiler takes Solidity and compiles the logic down to Bytecode which then can be read by EVM.

  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?

The script on BTC is not Turing Complete.

  1. What is a Turing Complete programming language?

Means you can program anything that you can think of - limitless applications (in theory). In addition to the limitless applications, a Turing Complete language has Loops.

1 Like

It functions like a virtual operating system, allowing you to execute the programming of smart contracts while isolating them from doing any damage to the system its running on.

The EVM reads Bytecode.

Solidity is a high level programming language that is more accessible and readable to us humans, while Bytecode is a low level language that is easily executable by computers but very difficult for humans to read. Programs can be written in the Solidity language for ease of use, then translated using a compiler into Bytecode for execution by the EVM. They express the same thing, just in different languages.

The programming language Bitcoin is written in just isn’t capable of complex functionality, much like primitive cavemen didn’t have the written language to express complex idea’s.

A turing complete programming language is one which is capable of iterative and decision making instructions, allowing for complex functionality.

1 Like
  1. EVM stands for Ethereum Virtual Machine, which is a piece of code that read the instructions (compiled in bytecode) in a smart contract and execute them.

  2. The format of instructions should be in byte code in order for the EVM to read it and understand it.

  3. Bytecode is obtained by complying through Solidity.

  4. Bitcoin developers wanted it to be only a currency, a virtual gold and wanted to avoid to be dealing with spam, there are few things that can be done with Bitcoin such as multi-sig wallet, but these are very limited as the programming language (Script) is not turing complete, meaning that it cannot solve all problems.

  5. A Turing complete programming language (Solidity) has the so called : LOOPS;
    Loop is a feature that allows to program a software to do a particular thing several time.

1 Like
  1. EVM is a piece of code that all computers in the network are running. It runs on top of the existing hardware of each node and can read and run smart contracts.

  2. EVM can read Bytecode.

  3. A smart contract would be written in Solidity, it is then compiled into Bytecode.

  4. Bitcoin has Script programming language which is not Turing complete.

  5. A Turing complete language can solve any problem it might have to solve, you can implement any possible algorithm with it.

1 Like
  • What does the EVM do?

Ethereum virtual machine, or EVM for short, is a blockchain-based software platform. It allows developers to create decentralized applications (Dapps). Programmers value them for having no downtimes and keeping all created objects safe from modifying. (bitdegree.org)

  • What is the format of the instructions that the EVM can read?

The smart contract will be written in Solidity, but the instructions will be compiled into EVM bytecode which the EVM of a node can send to the CPU of the node to execute those instructions. Thus, it is a readable version of the code that the EVM can read. All the EVMs of all the nodes in the network must achieve consensus.

An EVM consist of a database and the interpreter for EVM bytecode.

The interpreter runs EVM bytecode and is specially designed for creating secure deterministic programs suitable for blockchains. The most popular language for coding EVM smart contracts is Solidity, however any language that compiles to EVM bytecode can be run by the EVM interpreter. (https://loomx.io/developers/ko/evm.html)

  • What is the relationship between the programming language Solidity and Bytecode?

Solidarity is the programming language that converts instructions into byte code which is then executed on the CPU,

  • Why can’t Bitcoin run the same type of complex programs like Ethereum can?

These networks’ differences in functionality make sense given the differences in their programming languages. Both Bitcoin and Ethereum are scriptable, meaning that users can add code in both networks to automate tasks. But due to differences in programming, developers are able to code more efficiently and creatively on Ethereum than on Bitcoin.

Ethereum uses two programming languages, Solidity and Serpent, that are easy for developers to build with. These languages are advanced enough to be described as “Turing complete,” which means that they can solve any computational problem. They are also clear and readable, so developers can quickly use the advanced tools to create DAPPs. Here’s an example of Ethereum script in its Solidity language.
Bitcoin’s lower level of scriptability can be attributed to its restrictive language. Developers can only use it to do basic things, plus its scripting language is practically unreadable. For example, the ScriptPubKey, the short script that i9dentifies Bitcoin recipients, is an incomprehensible bundle of numbers and letters. (https://www.interana.com/blog/why-ethereum-matters)

  • What is a Turing Complete programming language?

Turing completeness is a concept from theoretical computer science. It tells you how powerful a programming language is. Not in terms of performance or maintainability or how rich its ecosystem is. A programming language is Turing complete if you can implement any possible algorithm with it. (https://dev.to/gruhn/what-makes-a-programming-language-turing-complete-58fl)

2 Likes
  1. The EVM acts as a standardized middleman between smart contracts and the CPU across all nodes to ensure consistent acceptance of the smart contract conditions.

  2. EVM can read bytecode

  3. Solidity is the primary language used by ethereum and is translated into bytecode so that it can be read by EVM

  4. Bitcoin does not have a turing complete language, meaning it is limited in its cpabilities.

  5. A Turing Complete Programming language is one that allows for complex problem solving becuase it has limitless applications

2 Likes

Excellent answers, It’s easy to understand. Please keep them like that :muscle:

Carlos Z.

1 Like
  1. Encapsulates the CPU and ensures the smart contract does not do anything malicious to your computer. The EVM interprets and executes the smart contract.

  2. Bytecode.

  3. Solidity is the primary language used by ETH and is translated into Bytecode so that it can be read by EVM.

  4. Because BTC is turing incomplete. That is, it is limited in its capabilities.

  5. One that allows for complex problem solving. It has loops which enable it to have unlimited applications.

1 Like
  1. EVM makes it possible to execute code on the network so that all computers verify the same result for consensus to be reached.

2.bytecode

3.solidity code gets compiled into bytecode to be processed/compatible with the smart contract.

4.because bitcoin uses script programming language which doesn’t allow to just program anything on the network due to the language not being Turing complete

5.its a language that you can implement any possible programming algorithm with it

1 Like
  1. What does the EVM do?

EVM reads and executes smart contracts. It passes instructions to the CPUs of the nodes on which it is running.

  1. What is the format of the instructions that the EVM can read?

EVM byte code.

  1. What is the relationship between the programming language Solidity and Bytecode?

Solidity is a Turing complete programming language that is easier to read and write for a human as it is similar to English. This needs to be compiled to EVM byte code before it is read by the EVM.

  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?

By design, Bitcoin programming does not allow looping. This is to narrow the use case focus of Bitcoin to be only a currency and not include programmable smart contract functionality, which can be unstable and resource-intensive.

  1. What is a Turing Complete programming language?

A Turing complete language allows looping functionality.

2 Likes
  1. The EVM reads and executes Ethereum smarts contract written in solidity, compiled in to bytecode. It uses the CPU in the nodes to process the execution rather then the CPU of each node.
  2. Bitecode
    3.Solidity is the human readable code that contracts are written / programmed in. Contracts are compiled in to Bytecode that is read by the EVM to execute the contract in the Ethereum network.
  3. Bitcoin code script is not turing complete, meaning it can not write really complex contract that includes the need for loops with conditional branching. This is deliberate cus the Bitcoin core devs dont want to be able to spam the Bitcoin network with infinate loops that would clog up the network.
  4. Turing completeness means that the language is able to program anything you want basically ( just like a Turing machine), or at least in theory. Cus it is depending on the amount of ram you can access with you computer.
1 Like
  1. What does EVM do?

Ethereum Virtual Machine reads and executes the smart contracts which are compiled in Bytecode. It gives instructions of the smart contract to the CPU of the nodes of the Ethereum network.

  1. What is the format of the instructions that the EVM can read?

Bytecode

  1. What is the relationship between the programming language Solidity and Bytecode?

Solidity is compiled on the smart contract into Bytecode. The Solidity language is a programming language that is used by humans to make programming easier.

  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?

Bitcoin is written in a non-turing comlete programming language. This language doesn’t allow looping.

  1. What is a “turing complete” programming language?

A turing complete programming language means that the programming language allows you to program anything you want on it.

1 Like
  1. EVM reads smart contracts and then tells cpu what instructions to perform.
  2. Byte code
  3. Solidity is compiled into byte code so that it can be read by EVM
  4. Because it is not Turing complete meaning that it’s programming language does not allow for those actions.(script)
  5. A turing complete language is one that can be programmed to do anything that you wish.(flexibility) can do it all yourself.
1 Like
  1. Ethereum Virtual Machine - Reads and executes the bytecode on smart contract. Also provides security around the smart contract.
  2. Byte code.
  3. Solidity is a language like java script which you write/code in, this goes through a compiler app and is compiled onto the smart contract in bytecode.
  4. btc is not turing complete.
  5. Ethereum is a turing complete programming language, can execute loops and anything you can imagine to an extent, fees etc.
1 Like

1- The EVM allows all nodes on the Ethereum network to execute code / smart contracts on the network and reach consensus about the outcome.

2- The EVm can read instructions in Bytecode

3- Solidity is a language that compiles instructions written for the EVM into Bytecode.

4- Bitcoin cannot run the same type of complex programs like Ethereum can because the language that is it built with, Script, is not Turing Complete.

5- A Turing Complete programming language is a language that can recognise more complex rules for data manipulation, ie loops, and that can be used to program applications.

1 Like
  1. The EVM reads the smart contracts and passes the instruction on to the CPU which executes them. It is also a barrier preventing malicious code or contracts from taking over the CPU and the Ethereum Network.
  2. Bytecode
  3. The programming language Solidity is written by people to write the contracts. They are then compiled in Bytecode so that the EVM can read them. So does this mean that Solidity is the people language and the Bytecode the computer language?
  4. Because its programming language called script is limited and primitive (not Turing Complete), meaning it doesn’t have all of the functions which a Turing Complete language could execute.
  5. A Turing Complete programming language is a language which can program and execute any kind of computable functions. What is also important is that it can loop instructions.
1 Like
  1. The EVM assure security when using the components of the node’s computer to execute and read a smart contract.
  2. Byte code.
  3. The relationship is smart contracts they are written by programmers using the solidity language but then compile into byte code for EVM to read and execute.
  4. Bitcoin is using the script programming language which is not turing complete( not able to solve every problem), this programming language doesnt enable loops which is a crucial feature to doing complex programs.
  5. With a turing complete programming language, any problems is possible to solve.
1 Like
  • What does the EVM do?
    EVM reads and executes smart contracts.

  • What is the format of the instructions that the EVM can read?
    Bytecode

  • What is the relationship between the programming language Solidity and Bytecode?

  • Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    For security reasons, BTC did not want to allow spam and is not turing complete. This would have needed an increase in blockchain size.

  • What is a Turing Complete programming language? Turing Complete in theory allows the computer to programmed with anything, allows loops.

1 Like
  1. The EVM (Ethereum Virtual Machine) is a program running on the blockchain network, that reads smart contracts. By creating a separate environment to read the smart contracts, it isolates the smart contracts from the CPU of each node, and protects the integrity of the node network.
  2. The EVM can read bytecode.
  3. Solidity is a programming language, similar to javascript, so that the programmer can easily read the code, then a compiler will turn the Solidity code into bytecode so the EVM can read it.
  4. Bitcoin runs on Script, which is a limited programming language.
  5. A Turing Complete programming language can solve all the problems that you might need a program to solve.
1 Like
  1. The Ethereum Virtual Machine is an application running on all nodes. It reads smart contracts in Bytecode and executes this code.
  2. Bytecode.
  3. Solidity is a high level language, similar to Javascript, that allows Turing complete code. It is compiled into Bytecode using a compiler, and the Bytecode then runs, through the EVM, on the CPU of a node.
  4. Bitcoin’s programming language, Script, is not Turing complete.
  5. A Turing complete programming language is a programming language does not have any programming restrictions. Turing complete allows you to program anything you can imagine!
1 Like