Homework on EVM

Homework on EVM - Questions

  1. What does the EVM do?
    The EVM is an application/code that runs on top of existing nodes to form consensus. The EVM tells the CPU what to do after it reads the smart contract. The CPU does not have the power to directly interact with the smart contract for security purposes.

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

  3. What is the relationship between the programming language Solidity and Bytecode?
    Programmers use solidity code to compiled smart contracts to bytecode so that the EVM can read it.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin uses script which is not turning complete and does not have the ability to be programmed for loops. Bitcoin did not want loops in order to prevent spam on the network and decrease the size of its blockchain.

  5. What is a Turing Complete programming language?
    Ethereum’s Solidity is a Turing Complete programming language. Turing Complete means that it has the ability to perform code several times in a row, and without it you would have to write the code over again each time. Ethereum has scalability issues because of Solidity’s Turing Complete loops.

1 Like
  1. What does the EVM do?

The EVM reads the smart contract and tells the CPU’s in the network what to do. All the validators need to have the same result. That’s how consensus is created.

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

Bytecode, the programming language used for this is ‘Solidity’

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

Solidity is the compiler to create bytecodes, same as the new Ethereum programming language ‘Viper’. So to create bytecodes you will need a programming language. EVM doesn’t care which programming you use

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

Because bitcoin uses the programming language ‘Script’ , which is primitive and not turing complete. It’s not made for all this kind of functions

  1. What is a Turing Complete programming language?

When a blockchain has turing complete language it can run ‘loops’, that can automaticly run things for several times.

1 Like

Homework on EVM - Questions (Updated on Dec 3 2019)

  1. What does the EVM do?
  2. What is the format of the instructions that the EVM can read?
  3. What is the relationship between the programming language Solidity and Bytecode?
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  5. What is a Turing Complete programming language?

1- It is basically a SandBox, it operates above the CPU and encapsulates the Smart Contract ops, preventing it from getting to the CPU and therefore to the entire Network, given the case it may be malicious.

2- The EVM reads a Solidity, or Viper, script, compiles the orders into a Bytecode.

3- Solidity is the language in which the Smart contract is written, which is compiled into Bytecode for the CPU to execute.

4- Because Script (BTC’s language) is not Turing Complete, meaning that it can’t solve all problems presented.

5- A Turing Complete language can execute and solve ANY problem given.

1 Like
  1. What does the EVM do?
    The EVM is an application that all nodes run which allows smart contracts to run on the Ethereum network in a decentralized way where consensus is achieved.

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

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity is the programming language which a compiler compiles into Bytecode which is executable by EVMs.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Because Bitcoin’s programming language is not Turing Complete.

  5. What is a Turing Complete programming language?
    A Turing Complete programming language is able to used to write software to solve any computational problem.

1 Like
  1. An EVM (Ethereum Virtual Machine) reads the byte code and executes the instructions of the smart contract using the consensus of all nodes.
  2. Solidity translated into byte code.EVM then reads the byte code and executes each one of the smart contracts instructions.
  3. A compiler is used to compile/ translate into byte code. The byte code is run through the EVM on the CPU of a node.
    4.Bitcoin blockchain is not turing complete, unlike ethereal which is Turing complete and can perform many smart contracts.
1 Like
  1. EVM reads the smart contract (Solidity) & then directly executes it in byte code. The instructions of the smart contract are then indirectly executed by the CPUs of each of the nodes via an instruction from the EVM. EVM makes it possible to execute code on the network & get consensus across all the nodes.

  2. Byte code

3.The smart contract is initially programmed in Solidity, which is then passed through a compiler which formats the smart contract in Byte code that can read & executed by the EVM.

4.BTC is not Turing complete & can not run loops.

5 .A Turing complete language means that theoretically there are not limitations to what it can program it to perform.

1 Like

Homework on EVM - Answers

  1. What does the EVM do?
    A: It executes the code in smart contracts.

  2. What is the format of the instructions that the EVM can read?
    A: Smart contracts written in Solidity/Viper are compiled into bytecode which the EVM can read.

  3. What is the relationship between the programming language Solidity and Bytecode?
    A: Solidity is just a higher level abstraction of the smart contract.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    A: It is not turing complete.

  5. What is a Turing Complete programming language?
    A: It is a language that can solve any computational problem.

1 Like

1. What does the EVM do?
It reads the compiled byte code of a smart contract and tells the CPU to execute the instructions to get a result.

2. What is the format of the instructions that the EVM can read?
It is a compiled byte code.

3. What is the relationship between the programming language Solidity and Bytecode?
Smart contracts are written in Solidity, then compiled to byte code which is read by the EVM.

4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
The language used in Bitcoin (Script) is not Turing complete and can solve only simple problems, e.g. you can have multi-signature for Bitcoin but you cannot use loops.

5. What is a Turing Complete programming language?
A language that can solve any computational / math problem.

1 Like
  1. What does the EVM do?
    EVM reads smart contracts in Solidity, compiles instructions in bytecode, tell CPU to execute instructions
  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 codes and compiles instructions to bytecode, then EVM reads them and executes
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Because BTC uses the SCript that is not TuringComplete, they didnt want to have spams that will increase size of blocks
  5. What is a Turing Complete programming language?
    Solidity is TC programming language that has loops that allows you as a programmer to run instruction several times
1 Like

1 - The EVM is an ethereum virtual machine on the the blockchain , It can run small contracts and prevent small contracts to be executed directly on the node’s or miner’s hardware .

2 - The EVM reads bytecode , for any small contract write with any language but compile on bytecode.

3 - Solidity is the programing language for small contract on Ethereum . The EVM receives the instructions of these small contracts on Bytecode .

4 - Bitcoin have a programing language (script) who cannot handle complex instructions, it is limited , it is a turing incomplete language.

5 - In a turing complete programing language , it is possible to write anything you want as solidity .

1 Like

1. What does the EVM do?
It allows to execute code (smart contracts) on the network through nodes to form consensus.
2. What is the format of the instructions that the EVM can read?
EVM instructions are programmed in Solidity and compiled into Bytecode.
3. What is the relationship between the programming language Solidity and Bytecode?
Bytecode is compiled from Solidity.
4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
Bitcoin’s programming language, script, is primitive and not turing complete.
5. What is a Turing Complete programming language?
It is a programming language that “can do anything” and particularly can program looping in order to perform actions from code repetitively.

1 Like

Ethereum Virtual Machine; execute codes. each node got the EVM running to run smartcontract and tx withing the smart contract. all nodes have to agree to have a consensus

Bytecode written in solidity

Solidity is the languange the code is written in. through a compiler it deploys the code in bytecode so that is excecute by the EVM

BTC is using Script wich is nog Turing complete wich mean that it is limited at its capacity.
In Solidity anything u can think of can be written in code technically.

TC means that the language can perform ANY task u can think of at least technically.

1 Like

1. What does the EVM do?

The EVM read the smart contract and give instruction to the cpu to execute the code ,
Encapsulate the smart code
Ensure nothing malicious happen

2. 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?

Bytecode is write in Solidity

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

Because the Bitcoin is limited in term of not offering to execute a complex level in programming

  1. What is a Turing Complete programming language?

It’s a programming language which solve largess “human” problem

1 Like
  1. What does the EVM do?
    The EVM helps safeguard any malicious intent if there are in the smart contract from further spreading to the nodes in the network.

  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?
    Smart contracts are written in Solidity then the compiler will turn it into Bytecode

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Because it uses Script which is a bit more primitive in it uses like Multi-sign wallet.

  5. What is a Turing Complete programming language?
    It means that anything can be programmed, essentially anything that we can think of can be done in Solidity. Also it has Loops.

1 Like
  1. What does the EVM do? Provides a isolated (from the host computer) environment for smart contracts and transactions to perform in.
  2. What is the format of the instructions that the EVM can read? The EVM runs Bytecode.
  3. What is the relationship between the programming language Solidity and Bytecode? Solidity is a high-level computer language for humans and Solidity code is compiled into Bytecode.
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can? Satoshi Nakamoto envisioned Bitcoin as a decentralized, peer-to-peer transaction medium.
  5. What is a Turing Complete programming language? One that has decision-making loops.
1 Like
  1. The EVM, or Ethereum Virtual Machine, is a sandbox environment that is present on all nodes participating in the network. It is responsible for using the hardware present on the node to read and execute the compiled code of smart contracts. The result is then propagated through the network - if it is reproducible by the other nodes, consensus is reached.
  2. EVM reads compiled bytecode.
  3. Solidity is a high-level programming language that humans can interpret. After a smart contract is developed in Solidity, a specialized compiler converts the instructions into a low-level programming language called bytecode. Bytecode can then be read and executed by the EVM.
  4. The programming language used for Bitcoin, Script, is very basic in its design. Specifically, it does not support loops and therefore is not Turing complete.
  5. A Turing complete programming language requires that given enough resources, a result will be produced from any set of instructions.
1 Like
  1. The EVM is the result of the network that connects all ethereum nodes, its a “world computer”.
  2. Bytecode
    3 ethereum is codded in solidity but has to be converted in Bytecode in order to be read by the EVM.
  3. Its not turing complete.
  4. A language that can solve complex problems, has an unlimited potencial/usability in programming.
1 Like
  1. It reads the smart contract, verifies it has not malicious instructions and then tells the CPU to execute it
  2. Byte code
  3. In Solidity a code is programmed and later compiled to Byte code which is the format that EVM can read
  4. Because in Bitcoin programming language, Script, loops cannot be programmed
  5. A language in which you can program anything you think of
1 Like

What does the EVM do?

EVM is a smart contract application on the Ethereum blockchain.

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

Bytecode

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

The smart contracts are written in Solidity then compiled into Bytecode so the EVM can read it.

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

Because Bitcoin’s programming language does not have the looping capability that Ethereum’s Solidity does.

What is a Turing Complete programming language?

It allows programmers to essentially write any capability, solving complex problems in this case looping ability.

1 Like
  1. Ethereum has a decentralized replicated virtual machine (EVM) which is a sandboxed virtual stack embedded within each full Ethereum node and is responsible for executing contract bytecode.

  2. Bytecode is the format of instructions the EVM can read.

  3. Smart contracts are written in Solidity then compiled to EVM bytecode and deployed to the Ethereum blockchain for execution.

  4. The Bitcoin scripting language is not Turing-complete so it can not run the same complex programs as Ethereum. Satoshi intentionally chose a non-Turing complete language without the capability to loop to ensure the network is always in a deterministic state. If it were Turing-complete it would be running complex code that every single full node would have to process. If a program infinitely loops, it could cause the network to slow down drastically as resources are drained.

  5. A programming language that is Turing-complete is theoretically capable of expressing all tasks accomplishable by computers.

1 Like