Homework on EVM

Q1- What does the EVM do?

It reads and executes smart contracts (tells the CPU etc what to do – the CPU executes the contract indirectly via the EVM). It encapsulates the smart contract enabling greater security on each node running the EVM.

Q2- What is the format of the instructions that the EVM can read?

It reads byte code (that it receives from a compiler than “translates” the smart contract from solidity).

Q3- What is the relationship between the programming language Solidity and Bytecode?

The human programmers use the language solidity to program. The complier takes the human-written solidity language and feeds byte code to the EVM.

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

Because its scripting programming language is very limited – it isn’t a “Turing complete” language.

Q5- What is a Turing Complete programming language?

One that is not limited in what kinds of problems it can solve / allows for any type of problem to be solved

1 Like
  1. The EVM essentially protects all nodes running the ethereum blockchain from malicious attacks from smart contracts

  2. The format that the EVM can read is bytecode, you need a compiler to change your solidity/viper code into bytecode for the EVM to read

  3. You can code ethereum in solidity but the EVM (Ethereum virtual machine) can only read bytecode.

  4. Bitcoin can’t run the same type of complex language like ethereum because bitcoins programming language, Script, is not turing complete.

  5. A turing complete programming language is a language in which that in theory you can do anything you want on it, if you can think of something you can code it

1 Like
  1. The EVM serves as the virtual computer which runs the Ethereum blockchain and its programs. It is constructed of all the physical computers serving as nodes on the Ethereum network.
  2. The EVM instructions are formatted in bytecode.
  3. Solidity is the programming language used for programming smart contracts on Ethereum. Bytecode is the language that these smart contracts are compiled into, which is read and executed by the EVM.
  4. Although it is theoretically possible for complex smart contracts to run on the Bitcoin blockchain, Bitcoin developers did not want to include these kinds of programs to run on Bitcoin for a number of reasons. Since developers did not opt to add more complex programming capabilities to the bitcoin script language, the complexity of contracts made on bitcoin is limited.
  5. A Turing complete language is capable of performing the operations of a Turing machine. This means that it can, indifferent to the length or size of the computation route, complete any computation.
1 Like

What does the EVM do?

EVM stands between cpu and smart contracts, process contract algorithms by reading bytecode.

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

Ethereum reads Bytecode compiled by solidity or viper, programming languages for smart contracts for ethereum network.

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

We can say solidity is speaking and bytecode is translation. Bytecode is compiled program for EVM nodes to process.

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

Bitcoin has very primitive contract based on programming language named Script is not turing complete. Bitcoin however being asked to stay as just a simple digital currency instead of like an expandable infrastructure which takes risks of spammed by any possible looping script. (please correct if needed, I’ll be following)

What is a Turing Complete programming language?

Which is able to redefine the variables and free to restore the algorithm during run and isable to process loops that contains multiple iterations.

1 Like
  1. The Ethereum Virtual Machine Runs smart contracts on nodes in an isolated environment
  2. The Format that the EVM reads is Solidity
  3. Solidity is compiled into a version of EVM Bytecode, this is then run on the Ethereum nodes and executed
  4. Because bitcoins programming language is not turning complete. meaning that it has limited functionality
  5. see previous answer
1 Like
  1. The EVM makes it possible to execute code on the network in such a way we are all in consensus about what the result should be.

  2. The format of instructions that the EVM can read are opcodes.

3.Solidity is the language used to implement smart contracts. Bytecode is the computer object code for the EVM. Solidity is compiled into Bytecode which can be read by EVM. This is how a smart contract is able to be executed.

4.Bitcoins programming language is Script. Script canno execute loops making it not turing complete. Because of this Bitcoin can only execute linear or tree like instructions. Ethereum uses Solidity, which is is turing complete.

  1. A Turing Complete programming language is capable of running any possible algorithm.

1 Like
  1. What does the EVM do? - It is a piece of code that each of the nodes on the eth blockchain is running

  2. What is the format of the instructions that the EVM can read? - Smart contracts

  3. What is the relationship between the programming language Solidity and Bytecode? - Solidity will translate a language (which looks more like english than bytecode) to bytecode

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can? Bacuse it uses the script programming language. This language has more limitations than solidity and is more primitive than solidity. Script can be used to add multi signatures.

  5. What is a Turing Complete programming language? It can solve all the problems that comes with smart contracts on the eth blockchain. You can for example add loops, which lets you in a simple way perform the same tasks many more times. This simplifies the programming process.

great answers @NicoG @jostrings
To clarify, EVM doesn’t know anything about solidity. it reads only bytecode. so smart contract can be written in solidity, viper etc …

1 Like

Thank you for the clarification @abuga ! Very much appreciated.

Quick question. If smart contracts don’t need to be written in solidity, why has this become the main language for Ethereum Smart Contracts ?

1 Like
  1. What does the EVM do?
  • The EVM is like a bridge that runs smart contracts using the processing power of CPUs in the computers connected to the Network.
  1. What is the format of the instructions that the EVM can read?
  • It reads Bytecode.
  1. What is the relationship between the programming language Solidity and Bytecode?
  • Solidity is the language that programmers use to code smart contracts and these instructions are then converted into bytecode for them to be understood by the EVM.
  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  • Bitcoins programming language, Script, is not turning complete.
  1. What is a Turing Complete programming language?
  • It us a language that can be used to code the logic of any complex program.
1 Like

1 - EVM stands for the Ethereum Virtual Machine. executes code converting it into byte code

2 - The EVM Reads instructions in bytecode.

3- Solidity is the programming language that we use, it is converted to byte code for our computer processing ability.
4- The non-turing complete language that bitcoin uses is not suitable for complex operations

5- a turing complete programming language allows us the ability to program anything.

1 Like
  1. What does the EVM do?
    Ethereum Virtual machine is an application running on every node and executes byte code (being a layer between the CPU and the smart contract)

  2. What is the format of the instructions that the EVM can read?
    Byte code

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity is the programming language that you code in and it is translated to Bytecode.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Script is not a Touring complete language, while Solidity is.

  5. What is a Turing Complete programming language?
    It allows lot more logic and function to be programmed (e.g. loops)

1 Like
  1. EVM reads the tasks written in the smart contracts and forwards them to the CPUs (all nodes have the EVM application on their CPU).

  2. EVM bytecode.

3.The smart contracts are written in Solidity (by the programmers), then an application called compiler will change the code written in Solidity into bytecode (which is readable for EVM and CPU).

4.Because the script language is a Not Turing Complete language. This means it can do only limited/simplified tasks (cannot complete all programming tasks, e.g. loops).

  1. A Turing Complete language means the language is capable for anything in theory. Could perform any kind of calculations and repeat it several times, etc. A Turing Complete language has got loops.
1 Like

1.Ethereum virtual machine. It is executing the smart contract programms.
2.The format EVM can read is bytcode, machine language.
3.in solidity you can write the smart contracts. After that you need to compile it into a machine language like bytecode.
4.BTC is made for payments. Skript is s a non Turing Complete Language. BTC does t want apps running on BTC because of the limited size of the blocks.
5. When you use the Turing Complete Language you can theoretically translate all mathematical problems in this language.

1 Like

What does the EVM do?
EVM is the ethereum virtual machine present in all nodes of the Ethereum blockchain.
EVM is an application that reads the instructions from the SC and executes them, using the CPU resources of the nodes.

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

3. What is the relationship between the programming language Solidity and Bytecode?
Solidity (programming language ) is the used to programming smart contracts. Than using a compliler, the set of instructions is compiled in ByteCode in order to
be read and processed in the EVM.

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

Bitcoin uses the Script as programming language. The Script is not a turing Complete. Is capable to program simpler instruction, but not complex ones.

4. What is a Turing Complete programming language?
Turing Complet Programming language is capable to program complex instructions. In a simple way you can program anything mathematically feasible

1 Like
  1. The EVM (Ethereum Virtual Machine) is a network of computers, each computer is a smart contract processing node.

  2. The EVM can only read instructions in Bytecode.

  3. Solidity is a computer coding language, programmers use instructions in the English language to create the software to be run on the EVM; a compiler takes the instructions in Solidity and translates it to Bytecode.

  4. Bitcoin runs on Script, it is not Turing Complete (TC) coding language meaning it cannot run loops in its software. This is unlike Ethereum which runs on Solidity or Viper which are Turing Complete and allow for loops to be included in code.

  5. A Turing Complete programming language allows for complex operations such as loops, that is, bits of code that can repeat themselves until a set predetermined point, given a set of parameters.

1 Like

1- Is a piece of code that a network of computers are running. The EVM runs on the existing hardware of a node and reads and executes smart contracts.

2- EVM reads the Bytecode

3- Written in Solidity and then compiled in EVM bytecode through a compiler

4- Bitcoin can only run through script programming and it is primitive compared to what Ethererum programming can do. The script programming is limited and hence complex programs cannot be built on Bitcoin.

5- Allows to program anything than can be programmed and solve anything than can be solved. Loops are a feature present in Turing Complete programming allowing to replicated instructions several times. This allows for adapting of the smart contract.

1 Like

@NicoG
Solidity was created specially for smart contact and it is used by many developers, so it is always good to use a language that has big community. :slightly_smiling_face:

1 Like
  1. it makes sure that the SC doesnt give info directly to the CPU.

2.byte code.

3.you can turn solidity into byte code using a conpiler.

4.because it is not a turing complete language. meaning that you cant do complex things on it like apps and SCs.

5.a turing complete language is a language that you can build on. you can code freely. it solves all the problems that are in not turing complete languages. (loops are also in turing complete languages.)

1 Like
  1. The Ethereum Virtual Machine is a program code. I think that the best way to explain what the EVM is, is thining about EVM like an envelope. We use the EVM to run the code wrote in program languages such us SOlidity and Vyper. After that the smart contract is compyled and the EVM can run the compiled program. We use the EVM to check the code before running it and to make sure for the network that the code running on the EVMcannot do anything malicious. In simple words the EVM cover our asses
  2. It can read compiled progma in bytecode
  3. Solidity is a programming language while bytecode is the compiled version of solidity or any other languages
  4. Because Bitcoin cannot use a Turing complete languages while Ethereum can, so with BTC we can do only easy things.
  5. A Turing complete language isa programming language that allow you write any kind of program capable to do anything that ou would you like to implement in your program
1 Like