What  can(not) the EVM do?

Arkadiy Kukarkin

prev. CTO Mediachain (acquired 2017)

prev. prev. Hype Machine

@arkadiy in #creator-s4labels

OP_DUP OP_HASH160 20 0xecae7d092947b7ee4998e254aa48900d26d2ce1d
    OP_EQUALVERIFY OP_CHECKSIG
OP_RETURN 14 0x68656c6c6f20776f726c64212121

NOT Turing Complete

NOT Very Fun

State Trees in Blocks!

LLL

Serpent (Python-like)

Solidity (JS-like, kinda)

Unsafe Math!

contract mathFun {
    // (2**256 - 1) + 1 = 0
    function overflow() returns (uint256 _overflow) {
        uint256 max = 2**256 - 1;
        return max + 1;
    }
    
    // 0 - 1 = 2**256 - 1
    function underflow() returns (uint256 _underflow) {
        uint256 min = 0;
        return min - 1;
    }
}

More Unsafe Math!

contract mathFun2 {
    // 1 / 0 = 0
    function divideByZero() returns (uint256 _zero) {
        uint256 num = 1;
        return num / 0;
    }
    
    // 17 / 3 = 5
    function underflow() returns (uint256 _fraction) {
        uint256 prime = 17;
        return prime / 3;
    }
}

No Exceptions! Except...

[! TRUFFLE SOLIDITY ERROR] Error: VM Exception while processing transaction:
    out of gas
Failed to compile.

Everything costs Gas

  • All OPs cost Gas
  • Out of Gas is the only real Exception
  • Gas price changes with time
  • Transaction + global block gas limit

Incredibly Expensive State Storage

$100,000/GB+

Incredibly Complicated Common Operations

Tools Out of Sync!

Why bother?

First practical trustless, global computer

Growing Fast!

  • Better Tools (truffle)
  • Better scaling (sharding)
  • Offchain storage (mediachain)
  • Better languages?
  • New kids on the block (steem)
  • Learning what state to sync

Why bother?

Thank you!

BE Unconference 2017

By Arkadiy Kukarkin

BE Unconference 2017

  • 1,495