[Ethereum] Ethereum Virtual Machine code

bytecodeevm

Does anyone have an example of what EVM bytecode looks like? New to ETH and trying to understand what exactly gets executed by the virtual machine. Is it similar to how JVM bytecode gets executed from Java?

Thanks a bunch!

Best Answer

EVM is quite similar to JVM in terms of execution model. Both are stack machines executing bytecodes. EVM adds a concept of storage and its bytecode instructions are more suited for contract development.

The most comprehensive description of EVM is Ethereum yellow paper: https://ethereum.github.io/yellowpaper/paper.pdf - see point H.2 for instruction set.

Solidity has inline assembly: http://solidity.readthedocs.io/en/develop/assembly.html

The most "close to metal" language to program EVM is probably LLL.

Related Topic