ethereum
From there to here, and onwards yonder
Dr. Gavin Woodco-founder and lead developer, ethereum project
Overview
DecentralisationConsensusBlockchain
BitcoinDirectionEthereum
Hacking Society
The problem
Agreement necessary for collaboration.
Internet is great for comms but...
Too easy to lie.
The old solution
1. Identify authority2. Allow authority to impose “truth”
3. Blindly trust authority
How things are :-(
Someone,
somewhere
How things are :-(
Someone,
somewhere
Centralisation & Central Authorities
Single point of controlSingle point of failure
Single bottleneck
The limitation
Authority may be:incompetent (Sony &c. vs. thieves)
compromised (Google/Facebook &c. vs. NSA)biased (Visa/Mastercard/Paypal vs. Wikileaks)
corruptunavailable
unknown
Can’t we do better?
Technology!
The new solution
Avoid relying on authority.Use consensus of peers.
How things should be :-)
How things should be :-)
Basic Premise
“The truth is more common than any one lie”
Liars can try but, ultimately, they’ll be ignored by all others.
Which makes...
A decentralised solution for any sort of chronicling.
Chronicling: Time-series of archivable data
Block chain?
Digital messages (transactions) bundled into:
...Blocks.
Blocks linked in a chain to form chronicle.
The “Block Chain”
The “Genesis” block0
1
2
Proof-of-WorkTimestamp
Proof-of-WorkTimestamp
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.
Chain to State
It’s one thing to have a single chronicle,it’s another to know what it means
What is the language?
Transaction Semantics
...or the meaning of a transaction.
And thus the accumulated meaning of the chronicle.
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
Why form consensus?
Alice starts with $100
At the same time:Alice transfers $100 to Bob
Alice transfers $100 to Charlie
What happens?
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
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
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
ethereum
Formally...
Collective of Non-Localised Singleton Programmable Data-Structures
no authority, no centre, no server
Simile
Internet is to communicationas
Ethereum is to agreements
Another Simile
Ethereum is to Bitcoinas
a smart-phone is to a calculator
Bitcoin & Crypto-currencies
Used blockchain to implement basic clearing house contract without a central server
Ethereum & Crypto-law
Uses blockchain to implement arbitrary social contracts without a central server
Ethereum: State
Like Bitcoin, accounts with balances.Unlike Bitcoin, accounts can be contracts:
code to execute;storage for structured data
Ethereum: Transactions
Like in Bitcoin, transfer funds.
AlsoTransactions have data attached.
If destination omitted, creates a contract.If destination is contract, code gets executed.
Extensible semantics
Bitcoin: single accepted semantic for all data.(ownership of funds)
Ethereum: semantic dependent on contract.
Hacking Society
What does a contract look like?
Code Execution: Virtual Machine
Arbitrary size stackPUSH, POP, SWAP, DUP
Arbitrary temp memory (2256 bytes addressable)
MLOAD, MSTORE
Code stored in virtual ROMCODESIZE, CODECOPY
Virtual Machine
Arithmetic/Logic & CryptoADD, EXP, EQ, AND, LT, BYTE, SHA3 &c
Flow controlJUMP, JUMPI, PC
VM: Environment
Can read message input dataCALLDATALOAD, CALLDATASIZE, CALLDATACOPY
Can halt & give message output dataRETURN, STOP, SUICIDE
VM: Environment
Arbitrary storage (2256 words addressable)ISOLATED FROM OTHER ACCOUNTS
SLOAD, SSTORE
Can create & send messages.CREATE, CALL
VM: Environment
Can query blockchain informationTIMESTAMP, PREVHASH, NUMBER, COINBASE, &c.
Other informationADDRESS, BALANCE, ORIGIN, CALLER
VM
Storage, memory & processing costs ETH
(actually, costs GAS butGAS ⇔ ETH)
LLL: Basics
expression := ( <op-code> [<operand> ...] )<operand> is just expression
0 -> PUSH 0
(mload 0x20) -> PUSH 0x20 MLOAD
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
Simple Currency
[[ (caller) ]] 0x1000000000000(returnlll (when (= (calldatasize) 64) { (set ‘a @@(caller)) (when (>= @a $32) { [[(caller)]] (- @a $32) [[$0]] (+ @@ $0 $32) })}))
LLL: More
variadic arithmetic/logic
macros: (def ‘sqr (x) (* x x)) (sqr 4): (* 4 4)
LLL: Name Registration
(def ‘registrar 0x50441127ea5b9dfd835a9aba4e1dc9c1257b58ca)[0] 'register[32] 'Exchange(call (- (gas) 21) registrar 0 0 64 0 0)
Virtual currencies (Bitcoin)Digital proxy currencies (CFD, ‘Goldcoin’)
Financial instruments (Derivatives, Futures)Insurance & gaming
Registrars (ICANN, Namecoin, land)Reputation systems (Facebook, eBay)
Possible uses?
And eventually...
Trust systems (Verisign)Deeds & ownership
Document revision controlVoting systems
DAOsYour imagination!
The Project
100% Free SoftwareInclusive development, open source code.Official C++, Go, Python implementations.
Unofficial Java & Javascript
Development lead by
Ethereum ÐΞV team:
Jeff WilckeGavin Wood
Vitalik Buterin
& many contributors...
Specifications & Implementations:
White paper (Buterin)Yellow paper (Wood)
C++ (Wood)Go (Wilcke)
Python (Buterin et al)Javascript (Becze)
Java (Mandeleil, Savers)
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!)
And Web 3.0?
The decentralised Web
- or -
The Web without any web servers
ethereumFrom there to here, and onwards yonder
Questions?