Homework on EVM

  1. What does the EVM do?

The Ethereum Virtual Machine (EVM) is a robust, sandboxed virtual implicit enclosed within each complete Ethereum node,

capable of performing contract bytecode. Contracts are normally inscribed in higher-level languages, like Solidity,

then gathered to EVM bytecode.
2. What is the format of the instructions that the EVM can read? The Ethereum VM is a stack-based, big-endian VM with a word size of 256-bits and is used to run the smart contracts on the Ethereum blockchain.

Smart contracts are just like regular accounts, except they run EVM bytecode when receiving a transaction, allowing them to perform calculations and further transactions.

Transactions can carry a payload of 0 or more bytes of data, which is used to specify the type of interaction with

a contract and any additional information. Contract execution starts at the beginning of the bytecode.

Each opcode is encoded as one byte, except for the PUSH opcodes, which take a immediate value.

All opcodes pop their operands from the top of the stack and push their result.
3. What is the relationship between the programming language Solidity and Bytecode?

Solidity is compiled to bytecode that is executable on the EVM. With Solidity, developers are able to write applications

that implement self-enforcing business logic embodied in smart contracts, leaving a non-repudiable and authoritative record of transactions
4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?

Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right.

It is purposefully not Turing-complete, with no loops.
5. What is a Turing Complete programming language?

Solidity

1 Like

1. What does the EVM do?

  • The EVM is executing the instruction of the Smart Contract.
  • The EVM is making the connection between the CPU of the computer and the Smart Contract.
  • The EVM is protecting the Node/Computer from possible malicious Smart Contracts.

2. What is the format of the instructions that the EVM can read?
The EVM will read the Byte Code resulted from the Compiler.

3. What is the relationship between the programming language Solidity and Bytecode?
The Code that was written in the programming language Solidity will be compiled by a Compiler app. which will result in a Byte Code.

4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
The reason why Bitcoin can’t run the same complex programs, is that Bitcoin is not Turing Complete, which means it is very limited, even though it has it’s own programming language (Script).
On the other hand, Ethereum is Turing Complete, which allows complex programs to be created using Solidity.

5. What is a Turing Complete programming language?
A Turing Complete is a programming language capable of creating complex and probably unlimited types of Apps / Softwares / Smart Contracts.

1 Like
  1. EVM will read the smart contract in byte code and send instructions to the CPU
  2. Bytecode
  3. Solidity is being compiled to bytecode
  4. Because it is not Turing complete on purpose
  5. A language that any application can be written to solve any problem
1 Like

What does the EVM do?
It reads the instructions from the smart contract and tells the CPU of the node to execute the instructions.

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

What is the relationship between the programming language Solidity and Bytecode?
EVM uses the programming language Solidity to read the instructions of the smart contract. The instructions are written in Bytecode.

Why can’t Bitcoin run the same type of complex programs like Ethereum can?
Bitcoin has a programming language called Script. Script is not Turing Complete. Meaning it can only execute basic instructions. Advanced instruction cannot be executed because Script does not have the so called loops (for- and while loops).

What is a Turing Complete programming language?
Turing Complete programming language is a language that can use loops. Loops allows the programmer to execute complex instructions.

1 Like

The Ethereum Virtual Machine, EVM, is a computer program that runs on all nodes in the ethereum network. We call this network the world computer because all the computers of the network are running the EVM, which has the job of calculating and verifying instructions as set down in smart contracts. Consensus is reached about the state of smart contracts as EVM is running on all nodes in the network.

EVM can be thought of as a security structure that sits between the actual step-by-step code that will be run and the CPUs of all the computers running said code. It would not be a good thing for CPUs to receive instructions directly from smart contracts without having to go through the EVM. By having EVM receive instructions from smart contracts the EVM can contain any harmful instructions that might attempt to takeover the world computer for evil reasons.

EVM can read bytecode. Bytecode is complied from Solidity, the language that we currently write smart contracts in. Viper is a new language that is slated to take the place of Solidity. Computer applications written in Solidity get complied (by a separate program called a compiler) to produce bytecode. EVM carries out the bytecode instructions by sending tasks to the CPU.

Contrasted with ethereum, bitcoin is not Turing complete. Bitcoin can run some simple and specific tasks with its own language called Script, but it cannot run Solidity or other programming languages that can solve computational puzzles. Bitcoin developers wanted to prevent time- and resource-consuming programs from running on the bitcoin network in efforts to keep it a store of value and sound money.

1 Like

Answers

  1. EVM is an application that every node has installed to read smart contract. It can executes smart contracts and give them to the CPU of each node.

  2. Bytecode resulted from the compiler.

  3. Solidity is the language used by developer, it’s seems like Javascript. When the developer has written the code, a compiler convert it into bytecode and then it’s ready for broadcasting on EVMs.

  4. Bitcoin is written in a language called Script. This language is not turing completed, so it’s infeasible to run complex programs on it. On the other hand, the community around bitcoin want to use the network just for transactions of value (for security and speed).

  5. In turing complete programming language you can program anything you want, even loops, so you use a clever and easy way to write the code.

1 Like
  1. The EVM is a piece of code running on every node on the network. It reads smart contracts & tells the CPUs to execute the code when consensus is reached. It protects the network by running in a sandbox environment so the smart contracts cannot directly access the CPUs on the network.

  2. The EVM reads instructions in Bytecode that is compiled from Solidity or Viper.

  3. Smart contracts are written in Solidy, then compiled into Bytecode for the EVM to read.

  4. BTC Script programming language is very primitive and is not turing complete.

  5. A turing complete programming language is one you can use to program anything you want through loops.

1 Like
  1. hat does the EVM do?
    The Ethereum virtual machine acts as a proxy between the smart contract (byte code) and the CPU, it executes the instructions contained in the smart contracts. It also provides security against malicious attacks by containing it within the EVM, should anything happen
  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?
    What is written in Solidity is passed through a compiler which generates byte code, a language the EVM understands.
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoins scripting capability is very limited, not turing and it doesn’t allow loops.
  5. What is a Turing Complete programming language?
    Bitcoin Script is not dynamic enough to solve all problems that it might need to, like web 1.0 vs Web 2.0
1 Like

1- EVM (Ethereum Virtual Machine) reads and execute smart contracts on bytecode and tells the CPU what to do. If every EVM on each node reaches the same result, consensus has been reached. It also plays a big role on the security of the ethereum network preventing malicious code to harm it.

2- It is bytecode

3- Solidity is a programming language that can be compiled in bytecode.

4- Because of the bitcoin blockchain size, bitcoin is programmed to be digital gold and would not be able to run smart contracts and scale. Script is not a turing complete language.

5- Means that almost everything can be developed on it. Solidity is turing complete language.

1 Like
  1. EVM reads the smart contract
  2. EVM bytecode
  3. Solidity is the language used to compile EVM bytecode
  4. because it not supposed to do so, bitcoin is just DIGITAL GOLD.
    Also SCRIPT is not turing complete
  5. a TC language is theoretically capable of solving any kind of problem
1 Like
  1. EVM runs on nodes and it reads and executes smart contract.
  2. EVM read bytecode.
  3. Solidity is the language that used to compile EVM bytecode.
  4. Because the Bitcoin programming language script is not turing complete.
  5. A Turing Complete programming language is a programming language that can technically execute any program
1 Like
  1. What does the EVM do?
    Is a code that all nodes are running in real time. It runs has on top of the Hardware in the Ethereum network. EVM can also read smart contracts.

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

The instructions would be written in bytecode/Solidity and then would be compiled into EVM byte code.

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

The instructions are in bytecode, Solidity is used by programmers to read the bytecode , and then it is compiled into bytecode and the EVM interprets the bytecode.

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

Bitcoin uses Script, Script is not turning complete. Ethereum uses Solidity, which is turning complete because it uses loops. BitCoin does not use Solidity to avoid spam and to avoid the increase of blockchain size.

  1. What is a Turing Complete programming language?

Loops, it programs nodes to do things several times.

  1. The Ethereum virtual machine runs on every node and executes the Bytecode.
  2. Bytecode
  3. A compiler compiles solidity into Bytecode
  4. Because Bitcoins scripting language is not turing complete
  5. You can basically write whatever you want.
1 Like
  1. EVM stands for Ethereum Virtual Machine that reads/execute the bitcodes of the smart contract.
  2. It means that it is been running virtually aside (capsulated9 from CPU to prevent malicious attach.
    3.Codes written in solidity is compiled into a series of bitcodes thanks to a compiler.
  3. Because of its programming language, script: it is more basic and not utring completed.
  4. TC programming language means that it will “flexible”/"complete to find a solution and able programmer to create more fun stuff.
1 Like
  1. EVM reads smart contract code or instructions and asks the cpu to execute the
    instructions.
  2. EVM reads the byte code.
  3. Solidity compiles to the byte code.
  4. Bitcoin is not Turing complete. it cannot solve all the problems a smart contract may
    ask it to do. Limited.
  5. a Turing complete language allows a smart contract to be programmed to do just
    about anything you instruct it to. not limited.
1 Like
  1. EVM will execute the code of a smart contract
  2. EVM can read code in Bytecode format
  3. Solidity is compiled into Bytecode
  4. Because Bitcoin is using Script language which is not a Turing Complete like Solidity language used in Ethereum
  5. Turing Complete language can do complex programming issues like loops which is very useful in sophisticated programs.
1 Like
  • What does the EVM do?
  1. EVM on the CPU’s take the byte code from the smart contracts and executes the smart contracts. They also run the S.C. To see of the results are the same on other CPU’s for consensus.
  • What is the format of the instructions that the EVM can read?
  1. byte code compiled from solidity.
  • What is the relationship between the programming language Solidity and Bytecode?
  1. Solidity takes the smart contract code and compiles it into byte code so the EVM can execute the smart contract.
  • Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  1. Bitcoin is programmed with script, a non-Turing complete language. Cannot solve all problems of applications.
  • What is a Turing Complete programming language?
  1. Solidity is a Turing complete language that can program anything you want. It can solve problems on applications that non-Turing languages cannot. Ethereum is Turing, Bitcoin is non-Turing.
1 Like
  1. The EVM runs the smart contract and comes up with an end result
  2. Byte Code
  3. Solidity is the language in which smart contracts are written. They are then converted over to Bytecode so that the EVM can run them.
  4. The language used “Script” is not capable of running a complex set of instructions or smart contracts
  5. You can basically run anything you can think of on a Turing Complete language. You can not do this on Bitcoin as Script is very limited
1 Like
  1. its the OS that runs smart contracts on the ethireum blockchain

  2. bytecode

  3. solidity gets converted into bytecode to run on the EVM

  4. script is not turing complete

  5. a programming language that can do anything in theory

1 Like
  1. The EVM compute all the smart contracts coded on the blockchain.

  2. EVM can read and compute Bytecode.

  3. Solidity is the programming language, like javascript, and when put in a compiler, it can be transformed into bytecode, readable by the EVM.

  4. Because it’s not possible to program complex things on top of the bitcoin blockchain. Script is not a Turing complete programming language.

  5. A Turing complete language is tooled adequatly to compute basically any type of operations. For example loops can be computed in a TC language but not in Script.

Question : i have heard of Sharding. Will the next EVM compute different shards at the same time ?