Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 1.44 KB

evm.asciidoc

File metadata and controls

27 lines (14 loc) · 1.44 KB

Ethereum Virtual Machine

What is it?

Compare to

  • Virtual Machine (Virtualbox, QEMU, cloud computing)

  • Java VM

Virtual Machine technologies such as Virtualbox and QEMU/KVM differ from the EVM in that their purpose is to provide hypervisor functionality, or a software abstraction that handles system calls, task scheduling, and resource management between a guest OS and the underlying host OS and hardware.

Certain aspects of the Java VM (JVM) specification however, do contain similarities to the EVM. From a high-level overview, the JVM is designed to provide a runtime environment that is irrespective of the underlying host OS or hardware, enabling compatibility across a wide variety of systems. High level program languages such as Java or Scala that run on the JVM are compiled into the respective instruction set bytecode. This is comparable to compiling a Solidity source file to run on the EVM.

EVM Machine Language (Bytecode)

The EVM Maching Language is divided into specific instruction set groups, such as arithmetic oprations, logical and comparison operations, control flow, system calls, stack operations, and memory operations. In addition to the typical bytecode operations, the EVM must also manage account information (i.e. address and balance), current gas price, and block information.

State

Compiling Solidity to EVM bytecode

Execution of EVM bytecode

Gas, Accounting

Turing Completeness and Gas