Homework on EVM

  1. What does the EVM do? The EVM reads the instructions of the smart contract that are in Bytecode and executes the instructions to the CPU. The EVM is on every node in the network and when the CPU returns the result of the smart contract it is the same across the nodes - The EVM also has a Security component here as it protects the nodes CPU from malicious smart contracts.

  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 an ETH language and through a compiler coverts the language into Bytecode which is then read by the EVM.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can? Because BTC’s language Script is not TC and BTC wanted to not allow for smart contract integration from fear that smart contracts can spam the network an example of which could be a long loop.

  5. What is a Turing Complete programming language? TC languages like Solidity and Viper allow for more complex functionality and can in theory allow for any future programming to occur.

1 Like
  1. What does the EVM do?

EVM reads the smart contract written in solidity and the compile to bytecode, tell CPU what instructions it should execute then it will return result

  1. What is the format of the instructions that the EVM can read?
    EVM reads instructions in bytcode that were compiled from code written in solidity language

  2. What is the relationship between the programming language Solidity and Bytecode?
    solidity code is compiled to bytecode and EVM runs bytecode

  3. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Because Bitcoin is using simple scripts that are very limited and are not a Turing Complete programming language

  4. What is a Turing Complete programming language?
    It is programing language that can run complex operations like loops

1 Like

thanks for your reply :).

a TC programming language can develop any kind of application, run any program and solve any kind of computational problems. it can perform any virtual task as long as it has the correct insturctions, enough time and processing power. one important feature is TC program allows loops - a set of instructions can be executed and repeated several times.

Homework: EVM

The Ethereum Virtual Machine (EVM) runs on all nodes in the network and executes code from smart contracts using the node’s local resources. It provides some level of protection for the node versus running a smart contract directly.

EVM reads Bytecode. Programs written in Solidity must be compiled into Bytecode for the EVM to be able to read them.

Solidity is a programming language used to write smart contracts (human readable). Code written in Solidity is compiled into bytecode before being executed by the EVM.

The bitcoin programming language (script) is not turing complete. This means that it runs only simple operations, not complex programming tasks like loops. This limitation is by design, to keep things simple and allow developers to better predict how it is used on the blockchain.

A turing complete language can theoretically solve any problem given the programmer can tell it how to do so. It must support loops and the reading and writing of variables.

1 Like

The EVM is the Etherium virtual machine that reads smart contracts into Byte code

EVM reads Bytecode

Solidity is a programming language that its similar to javascript, it uses a special application called Compiler that takes the solidity code and compiles instructions you give in solidity down to Bytecode then the EVM reads the byte code.

Because one, spam, all the smart contracts would still need to be stored on the blockchain, second, Blockchain Size, Too many transactions on the blockchain take up too much some.

Turing Complete means that the programming language can solve any problems on the computer in theory.

1 Like

1.) The EVM reads the code of a program/smart contract for security reasons for the node before the CPU does so that after it read the code it can tell the CPU what to do without getting any of the malicious code.

2.) ByteCode

3.) Solidity is the main programming language of Ethereum and it compiles the code to turn it into ByteCode so that the EVM can read it.

4.) Because the Programming language that bitcoin “script” is not turing complete. Not turing complete means that it can only execute simple things. Bitcoin made it like this so that it will make things simple and easier to get into.

5.) A turing complete language can solve or create anything in theory since any programmer can tell it what to do. it supports Loops which allows you to let code do the same code again and again for as many times you tell it to.

1 Like
  1. EVM reads the byte code created by the compiler from the language (Solidity) the smart contract is written in, and executes the smart contract on each node.
  2. Byte Code
  3. Smart contracts are currently written in Solidity, which then goes through a compiler that converts the instructions into Byte Code (which the EVM can read)
  4. It’s not designed to be able to do everything you can think of, therefore it’s not Turing Complete. But it was designed that way to keep the data on the blockchain small and only be able to run Bitcoin as money, that’s all.
  5. This kind of language is able to solve for any solution you can come up with. You’re supposed to be able to write solutions for whatever you want to do.
1 Like

• What does the EVM do?

EVM is an application which is running on each node.
EVM is executing the smart contract and giving instructions to the CPU.

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

• What is the relationship between the programming language Solidity and Bytecode?
Solidity is an programming language who needs a compiler that change the script data into byto code, which is readable by EVM.

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

Bitcoin is programmed in a not-turing complete language that only allows simple instructions in the sense of a smart contract.

• What is a Turing Complete programming language
It is a programming language with which you can theoretically solve any problem, no matter how complicated it is.

2 Likes

1. What does the EVM do?
EVM is the ethereum virtual machine. It runs the compiled to bytecode smart contract code, making sure it does nothing malicious to host it’s run on and thus the whole 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?
Solidity is a high-level programming language used to write smart contract code that after being compiled to bytecode is run by EVM.

4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
Script, programming language used in Bitcoin network is not Turing Complete.

5. What is a Turing Complete programming language?
It means that in principle one should be able to solve any computation problem using this language.

2 Likes
  1. What does the EVM do?
  • An EVM acts as isolated environemnt and is the intermediary for a CPU to be able to read, write, and execute bytecode. This can then be translated to CPU for execution.
  1. What is the format of the instructions that the EVM can read?
  • Bytecode is the format in which a EVM can read.
  1. What is the relationship between the programming language Solidity and Bytecode?
  • The relationship between Solidity and Bytecode is that Bytecode is all the instructions from a smart contract complied from Solidity. This way, the EVM can read the bytecode. The EVM only cares about the bytecode that it receives.
  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  • Bitcoin cannot run the same type of complex programs as Ethereum because Script, the native programming language of Bitcoin, is not turing complete. Script cannot do loops, and that is intentional for security purposes of the network.
  1. What is a Turing Complete programming language?
  • When a programming language is Turing Complete, it is saying that it can solve any problem that you can think about.
1 Like

1.EVM (Ethereum Virtual Machine) is the environment which smart contract codes run independent of CPU in a decentralized manner.
2.Byte code.
3.Bytecode is the compiled output of the codes and commands written in solidity.
4. Because script (The language Bitcoin is written with) is not Turing Complete therefore no loops can be done.

5.Turing Complete Language is capable of looping the commands and adapt loops in all changing states of the smart contract.

1 Like

1.Ethereum virtual machine- code Eth nodes use to execute programs
2. Solidity and Viper
3. Solidity is used to program the byte code
4. Because BTC version of a smart contract is web 1.0 type language called script which is very basic.
5. Turing complete means in theory you can program anything you want.

  1. What does the EVM do?

The EVM executes the instructions of the smart contract.

  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 compiles the smart contract into bytecode in order for the EVM to execute the instructions

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

Because Bitcoin is not turing complete and is only designed to execute simple programs.

  1. What is a Turing Complete programming language?

Solidity on Ethereum --> a programming language that in theory can think of all complex programs to be executed.

1 Like
  1. What does the EVM do?
    It is an application on a node which can execute instructions of a smart contract.

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

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity is a programming language which is then compiled into Bytecode.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    It has a language called script which is very simple - which is not Turing complete.

  5. What is a Turing Complete programming language?
    It can execute complex instructions and has loops.

1 Like
  1. The EVM is the Ethereum Virtual Machine and is an important part of the security of Smart Contracts. All Smart Contracts are programmed in Solidity and the EVM will read all the instructions in Bytecode and tell the CPU of the Node computers what to do. The CPU will read these instructions and through the PoW algorithm once reaching agreement / achieving consensus will producing new blocks in the chain.

  2. The format of the instructions is written in the Solidity language and then compiled in Byte code for the EVM to give the instructions to be read by the CPU.

  3. The relationship between the programming language is that all of the Smart Contracts code are written in the programming language called Solidity which is then compiled in the Bytecode for the EVM to read and provide instructions to the CPU/Nodes.

  4. It is said that because btc’s blockchain code is written is script which is limited and cannot solve all the mathematical complex programs as Ethereum and is not Turing complete. Ethereum allows functions such as loops which allow the code the be run over and over again or up to a certain amount of times with one line of code. With btc’s program language script, even if it is an exact line of code which does the same thing over and over (aka a loop) it has to be written as a new line of code each and every time instead of providing it with a 1 line of code allowing it to loop over and over forever, once or a specified amount of times.

  5. A Turing Complete programming language is considered to be an algorithm which can solve all of the most complex mathematical programs a computer program can do. A program that is Turing complete needs to be consistent, determinable and follow a complete set of rules that must achieve the same set of actions.

1 Like

1.EVM makes possible to execute code in consensus, does all calculations in smart contracts
2. bite Code
3. Byte code is compiled from solidity
4. It is not turning complete
5. Solidity

  1. EVM is the bridge between the smart contract (solidity) and the CPU of each node. it also make the script into byte code
  2. Solidity
  3. Exactly the one mentioned in 1.
  4. btc is not turin complete and runs only simple scripts
  5. a language which can run complicated programs (all math functions)
  1. What does the EVM do?
    Read the byte code and execute on each CPU.

  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 a language to write code and it will be complied to bytecode.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    It will cause the size issue which leads to speed and other issues and the rules set for Bitcoin is not a TC programming language.

  5. What is a Turing Complete programming language?
    It is a programming language that can implement any possible algorithm.
    For example loop.

1 Like
  1. What does the EVM do?
    -EVM interacts with smart contracts and cpu , EVM execute actions on smart contracts by reading bytecode and then pass on results to cpu and etherum network.

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

  • EVM can read bytecode.
  1. What is the relationship between the programming language Solidity and Bytecode?
    -solidity is a programming language similar to JavaScript a developer would write codes on solidity which then will be complied into bytecode so EVM can read it and execute smart contracts as its coded.

  2. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    -beacuse the language that bitcoin network uses which is script is not Turing complete means it can not execute anything you can think of it can only execute some primitive commands such as multisig etc

  3. What is a Turing Complete programming language?

  • solidity is a Turing complete language means it can execute anything that you programme into it is not bound with any limitations
2 Likes
  1. What does the EVM do?

The EVM acts as a some sort of filter so that the nodes computers CPU´s don´t read and execute pieces of code that could be dangerous for their computers. The EVM will read all the instructions and make all the calculations. After that it will tell the CPU of the computer what to do.

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

EVM can read Bytecode, which is a compiled form of the Solidity code.

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

Bytecode is a compiled code from Solidity. Viper will probably also use Bytecode to compile the code in the language.

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

Bitcoin does not have a programming language that is Turing complete. Its programming language is called Script and although it allows to create multisig wallets it does not allow to create smart contracts. Bitcoin developers were against the introduction of smart contracts on Bitcoin as it is supposed to be digital gold. That is why Vitalik decided to create Ethereum, with a Turing complete language and with the ability to read and execute smart contracts.

  1. What is a Turing Complete programming language?

It is a programming language that theoretically allows a programmer to program anything. It is not limited to certain actions.

1 Like