ethereum: from there to here, and ownards yonder

58
ethereum From there to here, and onwards yonder Dr. Gavin Wood co-founder and lead developer, ethereum project

Upload: gavofyork

Post on 11-Jan-2015

452 views

Category:

Software


0 download

DESCRIPTION

Prresentation given at Campus Party, Ecuador 2014. Covers decentralisation, the blockchain, ethereum and web 3.0.

TRANSCRIPT

Page 1: Ethereum: From there to here, and ownards yonder

ethereum

From there to here, and onwards yonder

Dr. Gavin Woodco-founder and lead developer, ethereum project

Page 2: Ethereum: From there to here, and ownards yonder

Overview

DecentralisationConsensusBlockchain

BitcoinDirectionEthereum

Hacking Society

Page 3: Ethereum: From there to here, and ownards yonder

The problem

Agreement necessary for collaboration.

Internet is great for comms but...

Too easy to lie.

Page 4: Ethereum: From there to here, and ownards yonder

The old solution

1. Identify authority2. Allow authority to impose “truth”

3. Blindly trust authority

Page 5: Ethereum: From there to here, and ownards yonder

How things are :-(

Someone,

somewhere

Page 6: Ethereum: From there to here, and ownards yonder

How things are :-(

Someone,

somewhere

Page 7: Ethereum: From there to here, and ownards yonder

Centralisation & Central Authorities

Single point of controlSingle point of failure

Single bottleneck

Page 8: Ethereum: From there to here, and ownards yonder

The limitation

Authority may be:incompetent (Sony &c. vs. thieves)

compromised (Google/Facebook &c. vs. NSA)biased (Visa/Mastercard/Paypal vs. Wikileaks)

corruptunavailable

unknown

Page 9: Ethereum: From there to here, and ownards yonder

Can’t we do better?

Technology!

Page 10: Ethereum: From there to here, and ownards yonder

The new solution

Avoid relying on authority.Use consensus of peers.

Page 11: Ethereum: From there to here, and ownards yonder

How things should be :-)

Page 12: Ethereum: From there to here, and ownards yonder

How things should be :-)

Page 13: Ethereum: From there to here, and ownards yonder

Basic Premise

“The truth is more common than any one lie”

Liars can try but, ultimately, they’ll be ignored by all others.

Page 14: Ethereum: From there to here, and ownards yonder

Which makes...

A decentralised solution for any sort of chronicling.

Chronicling: Time-series of archivable data

Page 15: Ethereum: From there to here, and ownards yonder

Block chain?

Digital messages (transactions) bundled into:

...Blocks.

Blocks linked in a chain to form chronicle.

Page 16: Ethereum: From there to here, and ownards yonder

The “Block Chain”

The “Genesis” block0

1

2

Proof-of-WorkTimestamp

Proof-of-WorkTimestamp

Page 17: Ethereum: From there to here, and ownards yonder

PoW: A Buttress of waste

“Why your chain and not mine?”

Longest chain is “best”shorter chains are ignored

Non-trivial to make long chains as energy must be wasted (proof-of-work) in order to create blocks.

Page 18: Ethereum: From there to here, and ownards yonder

Chain to State

It’s one thing to have a single chronicle,it’s another to know what it means

What is the language?

Page 19: Ethereum: From there to here, and ownards yonder

Transaction Semantics

...or the meaning of a transaction.

And thus the accumulated meaning of the chronicle.

Page 20: Ethereum: From there to here, and ownards yonder

Bitcoin

Transaction: the transfer of some value so it can only be transferred onwards by using

(signing with) some secret.

Chronicle: The total value accessible by each secret key.

i.e. the account balances

Page 21: Ethereum: From there to here, and ownards yonder

Why form consensus?

Alice starts with $100

At the same time:Alice transfers $100 to Bob

Alice transfers $100 to Charlie

What happens?

Page 22: Ethereum: From there to here, and ownards yonder

The “double-spend” solution

A chronicle that everyone agrees on forces a single order. This is required.

$100 goes to either Bob or Charlie, but never both.

Second transfer ignored as no funds left.

Everyone agrees upon the recipient

Page 23: Ethereum: From there to here, and ownards yonder

The Alts

Attributes altered such as:

Proof-of-Stake: virtual “proof-of-work”Supply: increase, reduce, fixed, random, select

Best: GHOST rather than lengthSpeed: Lower block-time

Page 24: Ethereum: From there to here, and ownards yonder

Where are we going?

Language

StructuredBoolean

Rules

Triv

ial

Am

men

dabl

eG

ener

al

Numeric Discrete

(Less Relevant) (More Relevant)

CRYPTO-CURRENCY

APP-COINS

CRYPTO-FINANCECRYPTO-LAW

Page 25: Ethereum: From there to here, and ownards yonder

ethereum

Page 26: Ethereum: From there to here, and ownards yonder

Formally...

Collective of Non-Localised Singleton Programmable Data-Structures

no authority, no centre, no server

Page 27: Ethereum: From there to here, and ownards yonder

Simile

Internet is to communicationas

Ethereum is to agreements

Page 28: Ethereum: From there to here, and ownards yonder

Another Simile

Ethereum is to Bitcoinas

a smart-phone is to a calculator

Page 29: Ethereum: From there to here, and ownards yonder

Bitcoin & Crypto-currencies

Used blockchain to implement basic clearing house contract without a central server

Page 30: Ethereum: From there to here, and ownards yonder

Ethereum & Crypto-law

Uses blockchain to implement arbitrary social contracts without a central server

Page 31: Ethereum: From there to here, and ownards yonder

Ethereum: State

Like Bitcoin, accounts with balances.Unlike Bitcoin, accounts can be contracts:

code to execute;storage for structured data

Page 32: Ethereum: From there to here, and ownards yonder

Ethereum: Transactions

Like in Bitcoin, transfer funds.

AlsoTransactions have data attached.

If destination omitted, creates a contract.If destination is contract, code gets executed.

Page 33: Ethereum: From there to here, and ownards yonder

Extensible semantics

Bitcoin: single accepted semantic for all data.(ownership of funds)

Ethereum: semantic dependent on contract.

Page 34: Ethereum: From there to here, and ownards yonder

Hacking Society

What does a contract look like?

Page 35: Ethereum: From there to here, and ownards yonder

Code Execution: Virtual Machine

Arbitrary size stackPUSH, POP, SWAP, DUP

Arbitrary temp memory (2256 bytes addressable)

MLOAD, MSTORE

Code stored in virtual ROMCODESIZE, CODECOPY

Page 36: Ethereum: From there to here, and ownards yonder

Virtual Machine

Arithmetic/Logic & CryptoADD, EXP, EQ, AND, LT, BYTE, SHA3 &c

Flow controlJUMP, JUMPI, PC

Page 37: Ethereum: From there to here, and ownards yonder

VM: Environment

Can read message input dataCALLDATALOAD, CALLDATASIZE, CALLDATACOPY

Can halt & give message output dataRETURN, STOP, SUICIDE

Page 38: Ethereum: From there to here, and ownards yonder

VM: Environment

Arbitrary storage (2256 words addressable)ISOLATED FROM OTHER ACCOUNTS

SLOAD, SSTORE

Can create & send messages.CREATE, CALL

Page 39: Ethereum: From there to here, and ownards yonder

VM: Environment

Can query blockchain informationTIMESTAMP, PREVHASH, NUMBER, COINBASE, &c.

Other informationADDRESS, BALANCE, ORIGIN, CALLER

Page 40: Ethereum: From there to here, and ownards yonder

VM

Storage, memory & processing costs ETH

(actually, costs GAS butGAS ⇔ ETH)

Page 41: Ethereum: From there to here, and ownards yonder

LLL: Basics

expression := ( <op-code> [<operand> ...] )<operand> is just expression

0 -> PUSH 0

(mload 0x20) -> PUSH 0x20 MLOAD

Page 42: Ethereum: From there to here, and ownards yonder

LLL: Advanced

variables: (set ‘name <expression>)

(mload x) / (mstore y z): @x / [y] z

(sload x) / (store y z): @@x / [[y]] z

(calldataload x): $x

Page 43: Ethereum: From there to here, and ownards yonder

Simple Currency

[[ (caller) ]] 0x1000000000000(returnlll (when (= (calldatasize) 64) { (set ‘a @@(caller)) (when (>= @a $32) { [[(caller)]] (- @a $32) [[$0]] (+ @@ $0 $32) })}))

Page 44: Ethereum: From there to here, and ownards yonder

LLL: More

variadic arithmetic/logic

macros: (def ‘sqr (x) (* x x)) (sqr 4): (* 4 4)

Page 45: Ethereum: From there to here, and ownards yonder

LLL: Name Registration

(def ‘registrar 0x50441127ea5b9dfd835a9aba4e1dc9c1257b58ca)[0] 'register[32] 'Exchange(call (- (gas) 21) registrar 0 0 64 0 0)

Page 46: Ethereum: From there to here, and ownards yonder

Virtual currencies (Bitcoin)Digital proxy currencies (CFD, ‘Goldcoin’)

Financial instruments (Derivatives, Futures)Insurance & gaming

Registrars (ICANN, Namecoin, land)Reputation systems (Facebook, eBay)

Possible uses?

Page 47: Ethereum: From there to here, and ownards yonder

And eventually...

Trust systems (Verisign)Deeds & ownership

Document revision controlVoting systems

DAOsYour imagination!

Page 48: Ethereum: From there to here, and ownards yonder

The Project

100% Free SoftwareInclusive development, open source code.Official C++, Go, Python implementations.

Unofficial Java & Javascript

Page 49: Ethereum: From there to here, and ownards yonder

Development lead by

Ethereum ÐΞV team:

Jeff WilckeGavin Wood

Vitalik Buterin

& many contributors...

Page 50: Ethereum: From there to here, and ownards yonder

Specifications & Implementations:

White paper (Buterin)Yellow paper (Wood)

C++ (Wood)Go (Wilcke)

Python (Buterin et al)Javascript (Becze)

Java (Mandeleil, Savers)

Page 51: Ethereum: From there to here, and ownards yonder

Crowd Sale

Recently received over 30,000 BTC from sale of the future “crypto-fuel”.

Development underway atgithub.com/ethereum

(Great C++ coders walk this way!)

Page 52: Ethereum: From there to here, and ownards yonder

And Web 3.0?

The decentralised Web

- or -

The Web without any web servers

Page 53: Ethereum: From there to here, and ownards yonder
Page 54: Ethereum: From there to here, and ownards yonder
Page 55: Ethereum: From there to here, and ownards yonder
Page 56: Ethereum: From there to here, and ownards yonder
Page 57: Ethereum: From there to here, and ownards yonder
Page 58: Ethereum: From there to here, and ownards yonder

ethereumFrom there to here, and onwards yonder

Questions?