A broad-ranging introduction into Blockchain, the Mental Models to use to think about its implications (Blockchain as a Database, as a City and as a Continent); and a technical introduction into the key ingredients to build a blockchain as well as dApps.
8. Each database entry =
● time-stamped
● cryptographically secured
● linked to previous entry / ‘block’
8
9. 4 ke n i s B c ha
● Decentralized (no single
controller)
● Trustless (encrypted and
immutable)
● Incentives (for entire user
base & network)
● Programmable (embed logic)
9
39. Evo on T eb
Web 1.0 (~1990-2000)
“Read-only” Web
Directories
Static content/websites
Limited media
Web 2.0 (~2000-2015)
“Social” Web
Search & keyword-based
Dynamic & rich content
Social, user-driven
Web 3.0 (~2015- ??)
“Semantic” Web
Machine-readable / ‘Smart’
Personalized, decentralized
Execute files in Web
TBD if Open!? 39
46. Ope S ce M en
(re y i d en n ~1998)
● Open license & free software
● Code collection & libraries
(without service, users or data)
● Weak long-term incentives (no
business model)
● “Weekend developers” vs
Enterprise Contributors
(asymmetry in power) 46
47. “But it’s not because I can run MySQL
database for free ...
… that I can get a billion users and all
the data Facebook has”
47
48. From Open Source ...
Libraries & Code
No “instance”
No users
No data
No incentive
… to Blockchain
Live “Services”
“Instantiated”
Community of users
Data
Programmable Incentives
48
49. From Open Source ...
● Blueprints (of roads, power
grids, schools), no City
● Take blueprint and build your
own City from scratch
● Deploy your new Service and
work to get actual people in
there
… to Blockchain
● Participate in existing City
● Road system already exists(a service
deployed by someone else)
● Build your Service on top of others. Easier
to deploy Services.
● If City successful, Incentive to Participate!
● Same open & collaborative properties as
Open Source.
Bac C t a l ...
49
81. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
Alice wants to send 1 coin to Bob
Tra c o
Alice
Bob
TRANSACTION
Sender: Alice
Recipient: Bob
Amount: 1
81
82. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
Alice needs to sign the transaction
with her private key
En y i n
TRANSACTION
Sender: Alice
Recipient: Bob
Amount: 1
Ali
Alice
Private Key
Alice
Bob
82
83. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
Alice shares her private key so
everyone can verify her signature
En y i n
TRANSACTION
Sender: Alice
Recipient: Bob
Amount: 1
Ali
Alice
Private Key
Alice
Public Key Alice
Bob
83
84. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
Alice sends the signed transaction
to the network
Bro s i g
Alice
Bob
84
85. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
Miners add the new transaction to
their list of transaction to validate
Bro s i g
Alice
Bob
Transactions
85
86. To validate transactions, miners need to
solve a complex mathematical problem
Min
Transactions
aaf4c61d
dcc5e8a2
dabede0f
3b482cd9
aea9434d
#
00000000
000008a2
dabede0f
3b482cd9
aea9434d
#c41975d1
dae1cc69
b16ad889
2b8c7716
4e84ca39Nonce
Block hash
than starts
with N zeros
86
87. By solving the mathematical problem, the
miner has created a block
Blo
00000000
000008a2
dabede0f
3b482cd9
aea9434d
Pending transactions
Timestamp
Difficulty target
Nonce
Previous block hash
Reward
1 Bitcoin
87
88. And can append it to the previous one to
create a (block) chain
BloPending transactions
Timestamp
Difficulty target
Nonce
Previous block hash
00000000
000008a2
dabede0f
3b482cd9
aea9434d
00000000
00000ede
0f3b482c
d9aea943
8a2dab4d
00000000
0000082c
d9aea943
4d8a2dab
ede0f3b4
88
89. Computers (Nodes)
Miners (Full Nodes)
Users (Partial Nodes)
The miner broadcast the new
block to the rest of the network
Bro s
89
93. 93
Miners always try to mine
blocks with the longest &
valid chain they have.
It should be difficult to
mine a block.
Rul 1
Rul 2
93
94. Do b S en g (1)
Someone tries to spend the same coin 2 times,
at the same time.
94
95. Do b S en g (2)
Someone sends you a coin.
Then he revert the transaction by creating another block
to replace the one where your transaction was validated.
95
99. Dec r i d A li on
● Open Source
● Decentralized
● Incentivized
● Protocol
An application that is run by many users on a
decentralized network (not controlled by any
single entity)
99
100. Ad a t of DA
● Inherent Security
● Cryptocurrency Integration
● Resistance To Corporate
Intervention
● Potential For Innovation
100
104. Pro m g i C t iz s De t iz AP
Decentralized APP
● Database: Blockchain, BigchainDB, Mediachain, ...
● Deployment: (IPFS, Ethereum SWARM, FileCoin).
● Frontend: HTML, JS, CSS
● Backend: Smart Contract -> Blockchain
● Browser: Metamask, Mist, uPort, ...
● Framework: Truffle, Embark, Blockstack, ...
● DNS or ENS (Ethereum Name Service)
Centralized Web APP
● Database: MySQL, PostgreSQL, MongoDB, ...
● Deployment: DigitalOcean, Amazon EC2, …
● Frontend: HTML, JS, CSS
● Backend: API -> Database
● Browser: Google Chrome, Firefox, …
● Framework: Symfony, Laravel, Rails, ...
● DNS (Domain Name System)
104
107. To l & Fra r or DA
Sma n c & Sol y
● Speed and accuracy
● Trust
● Security
● Savings
107
108. To l & Fra r or DA
Tru l
● Automated contract testing
● Configurable build pipeline
● Generators (new contracts and tests)
● Instant rebuilding of assets
● Console
● External script runner
● Contract compilation and deployment
Development environment, testing framework and asset
pipeline for Ethereum
108
109. 10
9
To l & Fra r or DA
Web3.j
● web3-eth: Ethereum Blockchain &
Smart Contracts
● web3-shh: Whisper Protocol
to communicate p2p.
● web3-bzz: Swarm Protocol,
decentralized file storage.
● web3-utils: useful helper functions for
DAPP developers.
Ethereum JavaScript API
109
110. To l & Fra r or DA
Met k
● Don’t need to download 10+GB
blockchain
● Store your ETH in a chrome
extension
● Easy to set up
● Safe
● Not only a wallet, but also works on
DAPP.
METAMASK
Brings Ethereum to your browser
110
111. To l & Fra r or DA
IP
● Peer-2-Peer Transfer
● Content Addressing (Unique Identifier)
● No Duplication
● Tamper Proof
● Fast browsing of data
Open-source, peer-to-peer distributed hypermedia protocol
111
113. 11
3
Pub v P iv B oc h
Sim it
● Peer-to-peer network
● Consensus
● Immutability
113
114. Pub v P iv B oc h - Dif n e
Public Blockchain
● Anyone can join
● Incentivize participants to join.
Private Blockchain
● Need invitation
● No incentive
114
115. Pub v P iv B oc h - Pro & Con
Public Blockchain
Pros
● Users protected from developers
● Network effects
Cons
● Limited scalability
● Limited privacy
● Storage constraints
Private Blockchain
Pros
● Rule changing
● Known validators
● Transaction speed is high
● Cheaper transactions
● Well-connected nodes
● Privacy
Cons
● Lack of decentralized power
● Trust
● Higher probability of going down 115
116. Pub v P iv B oc h - Pla r
Public Blockchain Private Blockchain
116