Homework on EVM

  1. What does the EVM do?
    • Executes Smart Contracts
    • Virtually quarantines smart contracts // protects node hardware from malignant code
  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 written inna fashion similar to English // somethin humans can understand
    • A compiler then translates the instructions into byte code // somethin the EVM can understand
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    • “Script”, BTC’s programmin lang is NOT Turing Complete
  5. What is a Turing Complete programming language?
    • A Turing Complete lang can solve any kinda problem u throw at it
2 Likes

Excellent answers sir, well documented! Please keep them like that :muscle:

Carlos Z.

1 Like

Great answers sir! Welcome to the Ivan on Tech Forum! :smiley:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

An EVM does the following:

  • It sits on top of the node computers in the ethereum network
  • It reads Byte code that is compiled from Solidity, to read smart contracts
  • It’s essentially a layer that provides a form of security to the ethereum network
  • It provides this security by making sure the smart contract that it processes can’t do certain things, like hacking the users CPU etc

The format of instructions that the EVM can read is called Byte code.
This byte code is compiled from Solidity.
There is a new language being developed called Viper, that will also be able to be compiled to byte code.

The relationship between the programming language Solidity and Bytecode is one where the Solidity instructions/syntax is translated into Bytecode by a compiler.
This Bytecode can then be read by the EVM.
The EVM cannot read Solidity directly.

Bitcoin cannot run the same complex programs like Ethereum because Bitcoin uses a language call Script.
This Script language is not Turing complete.
We need Turing complete languages to run complex computations.

A Turing complete programming language can do the following:

  • Run complex calculations
  • Has features built into the language such as loops, which allow for operations to be run multiple time without having to issue the instruction multiple individual time
  • Turing complete languages provide the programmer the possibility of programming any idea that they can think of.
  • Turing complete languages are very mathematical at their core, providing the programmer great flexibility in the type of computations they can perform
1 Like

1.) An EVM reads the code/smart contract’s byte code and transmits the instructions to the node’s CPU to execute the contract.

2.) The EVM reads byte code.

3.) Solidity is the program that programmers use to write the code for the smart contract. Solidity uses a compiler that coverts the programming language into byte code.

4.) Bitcoin can not run the same programs as Ethereum because Bitcoin uses Java Script programming language which is limited to what it can do and is not a Turing Complete language.

5.) Turing Complete language is a programming language that is the flexible, letting the programmer write a program that is more flexible to solve more problems that you can not solve with a Non-Turing program, like Java Script.

1 Like

1.) It makes it possible for us to execute code in such a way that we are all in consensus as to what the result should be when executed.

2.)The EVM will read the instruction in bytecode then tell the CPU to exicute all of the instruction and if they come to the same result and if evrything is in consensus they it will continue.

3.) Solidity sits on top of the hardware software so these formulaic instructions can be executed. Solidity allows you to get down to bytecode so after it is compiled it will run the EVM.

4.) Bitcoin is not Turing Complete which means you can program anything you like into the smart contract. For instance it allowes loops.

5.) Solidity

1 Like

Hello,
1) An EVM is the ethereum virtual machine program that runs, executes, and secures the smart contracts on the ethereum blockchain.
2) The EVM program can read a programming language called evm byte code.
3) The relationship between the programming language Solidity and Byrecode is that solidity is the program used to turn smart contract instructions into bytecode that is then able to be read and executed by the EVM program.
4) Bitcoin can’t run the same type of complex programs like Eth. because it is written on a primitive programming language called script whereas ethereum is written in solidity which is a Turing complete language.
5) A turning complete language is a programming language capable of handling multiple applications and can solve multiple computational problems where as a non Turing complete program can mostly only solve one or two problems.

1 Like

The EVM (Ethereum Virtual Machine) runs on nodes using its CPU and other resources such as electricity to run byte code coded in Solidity. As nodes run the byte code, they will talk to other nodes to reach a consensus as to what will happen in a smart contract.

The EVM reads instructions in Solidity (and soon to be Viper) as byte code.

The relationship between the programming language Solidity and Bytecode is similar to source code written in any programming language and machine language. As Solidity -> Bytecode, source code -> machine language.

Bitcoin is unable to run complex programs like Ethereum because Bitcoin is not Turing Complete unlike Ethereum. This means that Bitcoin cannot run scripts that can loop if instance.

A Turing Complete programming language is any language that can simulate a Turing Machine. This is to say that it is in the same computational class as a Turing Machine.

1 Like
  1. EVM is a vitual machine that runs the programmed instructions of small contracts.
  2. Bytecode
  3. Solidity is a programming language similar to JavaScript used to develop smart contracts, then compiled (translated) into Bytecode, executable by EVMs.
  4. Script, the native programming language of bitcoin is not a Turing-complete language and cannot execute complex codes.
  5. A Turing Complete programming language has no limits, has features of loops, conditional branching, and memory manipulation.
2 Likes
  1. EVM is a software that can read and execute smart contracts.

  2. EVM can read bytecode.

  3. Solidity is the programming language to create smart contracts. The code needs to be compile to bytecode so the EVM can read it and run it through the blockchain.

  4. Bitcoin is not capable to run the same type of complex programs as Ethereum because it is not turning complete.

  5. Solidity is a Turing Complete programming language, anything can be programmed and has loops.

2 Likes
  1. The EVM Runs smart contract code.
  2. The EVM reads byte code.
  3. Solidity can be compiled into bytecode.
  4. Bitcoin uses a programming language called “Script” which is not turing complete.
  5. A programming language that makes it possible to program anything you want.
2 Likes
  1. EVM is a piece of code that all the nodes are running, it’s on top of the hardware and it can read and execute smart contracts.
  2. byte code
  3. Solidity is a programming language that complies to byte code so EVM can read it.
  4. The programming language of Bitcoin, Script is not Turing Complete.
  5. A programming language that allows you to solve multiple problems and it has loops, e.g. Solidity
2 Likes

@cdurri
Excellent answers sir, well documented! Please keep them like that :muscle:

Abel S.

1 Like
  1. EVM reads all the byte code inside a smart contract block and instructs CPU to execute the contract.

  2. It is byte codes.

  3. A program written in solidity is rewritten in EVM readable language byte code, by another application called compiler.

  4. Bitcoin runs on a programming language called script which is not Turing complete and has limitation in type of programs which it can execute. It does not have loop feature. A Turing complete language has Loop feature by which it can instruct CPU to to execute same program repeatedly multiple times.

  5. A turing complete programming language is a language where anything can be written by the programmer. There is no restrictions in the type of instructions which can not be written in TC language.

1 Like
  1. Ethereum Virtual Machine. It creates an isolated environment in which to execute code.

  2. Byte Code.

  3. The compiler puts the solidity language into byte code.

  4. It uses script, not turin complete so it is not able to complete all the problems it may have to.

  5. A language that can 'theoretically be programmed to do anything you programme it to do.

1 Like
  1. What does the EVM do?
    reads bytecode and executes it
  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 the language of the programmers and bytecode is what the compilers transforms that code into so that the machine can read it
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    It’s not Turing complete
  5. What is a Turing Complete programming language?
    An application is Turing complete when you can build any kind of application on top of it, being able to program anything that crossed your mind.
1 Like

-An EVM reads smart contracts (in bytecode) and execute this code. Consensus/Validation is achieved by comparing the results of the code in each EVM. An EVM is an isolated (sandboxed) piece of software running on all nodes.
-Instructions within an EVM/SC are in bytecode, which represents the logic of a Smart contract- compiled from a high level language (eg. solidity)
-Solidity is a high level language, similiar to Javascript, that allows turing complete code to be written. Bytecode is a compiled version of a SC written in solidity.
-BTC uses script, which is not turing complete, and limited to sequential and stack-based operations, which is not suitable for complex operations.
-Turing complete languages are languages, which eg. allows loops, (halting) states or conditions, means to have a “unlimited” and “universal” usage for progamming.

1 Like
  1. What does the EVM do?
    EVM reads the byte code and instruct CPU to execute all conditions in 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 program which is “converted” by app called complier into byte code that EVM understand it and execute it.
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin uses program script which is not turning complete unlike Ethereum which uses solidity which is turning complete. Not turning complete is limited with functions thus executions.
  5. What is a Turing Complete programming language?
    It is a program in which you can in theory program almost anything you want.
1 Like
  1. The EVM says to the CPU which instructions execute according to what is written into the smart contract. The EVM also ensure security avoiding that malicious actions written in a smart contract could be process by CPU.
  2. The EVM read data into smart contract written in Byte code.
  3. Solidity is the programming language used in Ethereum network. All contract written in Solidity are then compiled into Byte code, since EVM read that kind of code.
  4. Firstly due the type of programming language. In Bitcoin Script code could be used only to do simple things. This type code is also NO Turing complete and doesn’t have Loops feature that can be used to process the same bunch of actions multiple times.
  5. A Turing complete programming language means that can be used to solve any computation problem
1 Like
  1. What does the EVM do?
    – As a security measure, the EVM (Ethereum Virtual Machine) encapsulates and reads the instructions in the smart contract to make sure there are no malicious instructions and then converts the instructions into Bytecode and then sends the Bytecode to the CPU for execution

  2. What is the format of the instructions that the EVM can read?
    – The EVM reads Smart Contract code written in a high level language like Solidity and converts the high level code into Bytecode.

  3. What is the relationship between the programming language Solidity and Bytecode?
    – Solidity is a high level programming language similar to JavaScript whereas Bytecode is a lower
    level language that the CPU can read and execute.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    – Bitcoin can not run complex programs like Ethereum can because Bitcoin is written in Script which is
    a simple primitive language which is not Turning Complete

  5. What is a Turing Complete programming language?
    – A Turing Complete language such as Solidity and Viper can execute just about any complex
    instruction and processing - such as loops - that a computer can perform.

1 Like