Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Libby Kent on Ethereum: The World Computer - PW...

Libby Kent on Ethereum: The World Computer - PWL NYC

In 2009 bitcoin emerged as a peer-to-peer value transfer system, and was successfully deployed throughout the world. Four years later (2013), the Ethereum white paper was published by an 18 year old Vitalik Buterin which builds on top of the Bitcoin consensus model to allow for distributed computation and applications to be deployed on a decentralized peer-to-peer network.

This paper discusses introducing a turing complete language that can be run on top of the network, utilizing a modified consensus algorithm (GHOST), strategies for defending against mining centralization, further application of such a system beyond just finance, the introduction of state, as well as a history of bitcoin and and the fundamental concepts of the underlying blockchain.

Papers We Love

April 19, 2018
Tweet

More Decks by Papers We Love

Other Decks in Technology

Transcript

  1. Overview • Bitcoin: poof of work based blockchain • Ethereum:

    blockchain + general purpose PL + arbitrary state • EVM • DApps (smart contracts) 2 @viskobatz
  2. Bitcoin (2009) 1. “Decentralized peer-to-peer online currency that maintains a

    value without any backing, intrinsic value or central issuer.” 2. “Proof of work based blockchain for public agreement on the order of TXs. “first-to-file” bitcoin the first credible solution.” 3 @viskobatz
  3. Ledger Keeping Track of State Scruffy 15 Simon 10 Z^2

    9 Drun 8 Lydia 8 Tom 8 Brian 10 4 @viskobatz
  4. Single Leader -> Followers Centralized Scruffy 15 Simon 10 Z^2

    9 Drun 8 Lydia 8 Tom 8 Brian 10 (Z^2, 1) --> Scruffy (Drn, 1) --> Scruffy 5 @viskobatz
  5. Ledger (1) (2) (3) Current State (0) Start State Scruffy

    10 Simon 10 Z^2 10 Drun 10 Lydia 10 Tom 10 Brian 10 (Z^2, 1) --> Scruffy (Simon, 1) --> Scruffy (Tom, 1) --> Scruffy Scruffy 14 Simon 10 Z^2 9 Drun 8 Lydia 9 Tom 8 Brian 10 6 (Drn, 1) --> Scruffy @viskobatz
  6. Ledger (1) (2) (3) Current State (4) (0) Start State

    Scruffy 10 Simon 10 Z^2 10 Drun 10 Lydia 10 Tom 10 Brian 10 (Z^2, 1) --> Scruffy (Simon, 1) --> Scruffy (Tom, 1) --> Scruffy (Lyd, 1) --> Scruffy Scruffy 15 Simon 10 Z^2 9 Drun 8 Lydia 8 Tom 8 Brian 10 7 (Drn, 1) --> Scruffy @viskobatz
  7. Decentralized All Peers Can Commit (Z^2, 1) --> Scruffy (Drun,

    1) --> Scruffy (Lyd, 1) --> Simon (Drun, 1) --> Z^2 (Z^2, 1) --> Tom (Simon, 1) --> Scruffy (Lyd, 1) --> Scruffy (Tom, 1) --> Scruffy 8
  8. Decentralized Ledger Single Shared Truth Current State (1) (Z^2, 1)

    --> Scruffy Genesis State Scruffy 10 Simon 10 Z^2 10 Drun 10 Lyd 10 Tom 10 Brian 10 Scruffy 12 Simon 10 Z^2 9 Drun 9 Lydia 10 Tom 10 Brian 10 (Drun, 1) --> Scruffy 9 (0) @viskobatz
  9. Current State (1) (Z^2, 1) --> Scruffy Genesis State Scruffy

    10 Simon 10 Z^2 10 Drun 10 Lyd 10 Tom 10 Brian 10 Scruffy 12 Simon 11 Z^2 9 Drun 9 Lydia 9 Tom 10 Brian 10 (Drun, 1) --> Scruffy 10 (2) (Lyd, 1) --> Simon (0) @viskobatz
  10. Current State (1) (Z^2, 1) --> Scruffy Genesis State Scruffy

    10 Simon 10 Z^2 10 Drun 10 Lyd 10 Tom 10 Brian 10 Scruffy 13 Simon 10 Z^2 9 Drun 9 Lydia 9 Tom 11 Brian 10 (Drun, 1) --> Scruffy 11 (2) (Lyd, 1) --> Simon (3) (Drun, 1) --> Z^2 (Z^2, 1) --> Tom (Simon, 1) --> Scruffy (0) @viskobatz
  11. Current State (1) (Z^2, 1) --> Scruffy Genesis State Scruffy

    10 Simon 10 Z^2 10 Drun 10 Lyd 10 Tom 10 Brian 10 (Drun, 1) --> Scruffy 12 (2) (Lyd, 1) --> Simon (3) (Drun, 1) --> Z^2 (Z^2, 1) --> Tom (Simon, 1) --> Scruffy (4) (Tom, 1) --> Scruffy (0) Scruffy 14 Simon 10 Z^2 9 Drun 9 Lydia 9 Tom 10 Brian 10 @viskobatz
  12. (5) Current State (1) (Z^2, 1) --> Scruffy Genesis State

    Scruffy 10 Simon 10 Z^2 10 Drun 10 Lyd 10 Tom 10 Brian 10 (Drun, 1) --> Scruffy 13 (2) (Lyd, 1) --> Simon (3) (Drun, 1) --> Z^2 (Z^2, 1) --> Tom (Simon, 1) --> Scruffy (4) (Tom, 1) --> Scruffy (Lyd, 1) --> Scruffy (0) Scruffy 15 Simon 10 Z^2 9 Drun 9 Lydia 8 Tom 10 Brian 10 @viskobatz
  13. Proof of Work • Mechanism through which peers gain the

    right to participate in the systems. Miner 14 @viskobatz
  14. Proof of Work / Mining In Blockchain (Bitcoin) 0 1

    PrevBlockHeaderHash + nonce (242k) SHA-256 0000001…(256) target six 0s Repeatedly generate a nonce 2 17 @viskobatz
  15. Bitcoin Peers Closed World • state = copy who owns

    which Bitcoins (UTXO) • tree of new transactions • network / protocol rules: blocksize: 1MB blocktime: ~10 min consensus mechanism: proof of work 23 @viskobatz
  16. Bitcoin Accounts • Public private key pair. • Public key

    reference to the account (UTXO). • Externally owned by a secret key, digital signature to transfer value. 24 @viskobatz
  17. Bitcoin as a State Transition System • State (S): Shared

    ledger of who owns which bitcoins. UTXO (value, owner). • State Transition: Recording transfer of values. ‘$X from A to B’ (S, TX) -> (S’) 25 @viskobatz
  18. Bitcoin Script • Bitcoin Script (stack based language). • Opcodes:

    OP_SHA256, OP_VERIFY. • Bitcoin Script Not Turing Complete (no loops). • Verify a digital signature. 26 @viskobatz
  19. Alternative Apps On Top of Bitcoin Blockchain • Namecoin •

    Colored Coins > 1384: Litecoin (2011) Namecoin (2011) Auroracoin (2014) Zcash (2016) 28 @viskobatz
  20. Alternative Apps On Top of Bitcoin Blockchain • Namecoin •

    Colored Coins • Metacoins 29 @viskobatz
  21. 2 Approaches 1. Building an independent network. 2. Building a

    protocol on top of Bitcoin. 30 @viskobatz
  22. External Accounts (like Bitcoin account) • Externally owned by a

    secret key. • Send message by creating and signing a TX. 34 @viskobatz
  23. Contract Accounts • Internally owned – is contract code •

    Only runs when receives a msg. • Can read / write to internal storage. • Can create other contracts. 35 @viskobatz
  24. Ethereum Accounts are the State (S) • 20 Byte address:

    0xcc16e3c00dbbe76603fa833ec20a48f786dfe610 • State transition: direct transfer of value and information between accounts. 36 @viskobatz
  25. Interacting with the System • Transactions: come from external accounts.

    Signed data package that contains a message. • Messages: sent from external accounts and from internal (contract) accounts. 39 @viskobatz
  26. Transaction Need Gas STARTGAS GASPRICE Limit to pay for computation

    steps (how much gas you are willing to pay) e.g. 2000. Fee to pay miner per computation step, e.g. .001. 2000 * 0.001 = 2 ether Check that the sender has 42 @viskobatz
  27. ADD 3 10 13 ADD PC --> 86 85 SLOAD

    84 87 10 3 + 47 @viskobatz
  28. SSTORE 13 0 SSTORE PC --> 90 89 SWAP1 88

    [13,0,0,0,0,..] Contract Storage 48 @viskobatz
  29. Non-financial DApps (Governance) • Identity and Reputation Systems. • Decentralized

    File Store. • Decentralized Autonomous Organizations. 65 @viskobatz
  30. Ethereum Peers • state = External (who owns what) +

    internal (contract) accounts. • state transitions: arbitrary EVM • tree of new transactions • network / protocol rules: blocksize: 1MB -> limited by the gas limit blocktime: ~10 min à ~10-15 secs consensus mechanism: proof of work + GHOST 66 @viskobatz
  31. Ethereum • Concept to run arbitrary computations on top of

    a blockchain. • Easy to create alternative decentralized applications (DApps). • Namecoin a few lines of code. • Easy to create alternative coins. • PWL Token! • Keep Calm and Play on. 67 @viskobatz
  32. 68