Computing for Decentralized Systems Alejandro Avils (@OmeGak) 7th ~ - - PowerPoint PPT Presentation

computing for decentralized systems
SMART_READER_LITE
LIVE PREVIEW

Computing for Decentralized Systems Alejandro Avils (@OmeGak) 7th ~ - - PowerPoint PPT Presentation

Computing for Decentralized Systems Alejandro Avils (@OmeGak) 7th ~ 8th March 2018 Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) Distributed Systems Distribute /d str b.ju t/ To give something out to


slide-1
SLIDE 1

Computing for Decentralized Systems

Alejandro Avilés (@OmeGak) 7th ~ 8th March 2018

Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)

slide-2
SLIDE 2

Distributed Systems

slide-3
SLIDE 3

Distribute /dɪˈstrɪb.juːt/ To give something out to several people, or to spread or supply something.

slide-4
SLIDE 4

Distributed system Hardware or software components located at networked computers communicating and coordinating their actions to achieve a common goal only by passing messages.

slide-5
SLIDE 5

Advantages

Fault tolerance Sharing resources Lower latency

slide-6
SLIDE 6

Complications

Concurrency No global clock Independent failures

slide-7
SLIDE 7

Security model

Interfaces Cryptography Control and trust

slide-8
SLIDE 8

Role-based architectures

Client-server Peer-to-peer

slide-9
SLIDE 9

Decentralized Systems

slide-10
SLIDE 10

Decentralize /ˌdiːˈsen.trə.laɪz/ To move the control of an organization or government from a single place to several smaller

  • nes.
slide-11
SLIDE 11

Types of (de)centralization

Architectural (Location) Political (Authority) Logical (Consensus)

slide-12
SLIDE 12

Centralized systems

slide-13
SLIDE 13

Decentralized systems

https://youtu.be/C2vgICfQawE

slide-14
SLIDE 14

Decentralization in Nature

slide-15
SLIDE 15

Decentralization in Society

slide-16
SLIDE 16

Decentralization in Computing

slide-17
SLIDE 17

Consensus and Byzantine Fault Tolerance

slide-18
SLIDE 18

Consensus /kənˈsen.səs/ A generally accepted opinion or decision among a group of people.

slide-19
SLIDE 19

Network splits

slide-20
SLIDE 20

Strong consistency

Consensus algorithms Authority? Trust?

slide-21
SLIDE 21

The two generals problem

Attack at dawn ACK ACK' ACK''

slide-22
SLIDE 22

The Byzantine generals problem

🤟 🤟

slide-23
SLIDE 23

Scalability of trust

Trusted generals Complexity of trust O(N2) Centralization of authority

slide-24
SLIDE 24

Governance, Economics, and Proof-of-Work

slide-25
SLIDE 25

Governance /ˈɡʌv.ɚ.nəns/ The way that organizations or countries are managed at the highest level.

slide-26
SLIDE 26

Economics /ˌiː.kəˈnɑː.mɪks/ The social science that studies the production, distribution, and consumption of goods and services focusing on the behaviour and interactions

  • f economic agents.
slide-27
SLIDE 27

The siege

slide-28
SLIDE 28

Attack or retreat?

🤟 🤟

Let's go! Go go go! Retreat! Abort! Let's go back! Nope!

slide-29
SLIDE 29

Let's vote

Retreat!

🤟 🤟

Abort! Let's go back! Let's go! Go go go! Nope! Retreat!

slide-30
SLIDE 30

No central authority

Attack!

🤟 🤟

x9 Abort! Let's go back! Let's go! Go go go! Nope! Retreat!

slide-31
SLIDE 31

Treason ensues!

🤟 🤟

slide-32
SLIDE 32

Proof of Work~ish

slide-33
SLIDE 33

Economics in war

slide-34
SLIDE 34

Expensive voting

Consensus!

🤟 🤟

slide-35
SLIDE 35

Dominant strategy

rewardi = (loot / N) + valueOfStayingAlivei

  • (voteCost * votesi)

🤟

voteCost > ???

slide-36
SLIDE 36

Breaking the equilibrium?

🤟

???

slide-37
SLIDE 37

Bitcoin and the Blockchain

slide-38
SLIDE 38

Bitcoin /ˈbɪt.kɔɪn/ A purely peer-to-peer version of electronic cash that allows online payments to be sent directly from

  • ne party to another without going through a

financial institution.

slide-39
SLIDE 39

What is Bitcoin, really? 🤕

slide-40
SLIDE 40

A database*

Unrestricted read Unrestricted write * Append only Blockchain: Linked list of state updates

slide-41
SLIDE 41

Bitcoin network

slide-42
SLIDE 42

Bitcoin protocol

Describes valid blocks Will others take my block? Should I take this block?

slide-43
SLIDE 43

Bitcoin =

Measure of reward Granted to block issuer Described in the protocol New valid block arrives

slide-44
SLIDE 44

Bitcoin transactions

Transmission of ownership Described in the protocol Broadcasted Validated by peers Inserted in blocks

slide-45
SLIDE 45

A few problems

🤟 ⚡

Not a cost-free service Not everybody is trustworthy

💪

Reward's worth is subjective

slide-46
SLIDE 46

So... WHY does this work, really? 🤰

slide-47
SLIDE 47

Utility and cost

Permission-less Resilient Not cost-free

slide-48
SLIDE 48

The mining game

Valid blocks are rewarded Miners use CPU cycles They produce valid blocks

slide-49
SLIDE 49

Validity chain

Is this new block valid? Validators require past blocks

slide-50
SLIDE 50

Reward ledger

A database of transactions Anybody can broadcast Nobody can censor * Everybody can read

slide-51
SLIDE 51

Bitcoin as currency =

Portable Scarce Block creation is rate-limited Reward is not infinite 10' 10'

slide-52
SLIDE 52

Censorship resistance

🤟 🤟

slide-53
SLIDE 53

Sybil attack resistance

Power into valid blocks Honest nodes make profit Power into invalid blocks Malicious nodes gain nothing

slide-54
SLIDE 54

Race condition resistance

The longest chain rule Most work invested Adjustable difficulty Rate-limits updates 10' 10' 10' 10' 10'

slide-55
SLIDE 55

Proof of Work in Bitcoin

slide-56
SLIDE 56

Block hashes

Double SHA-256 Hash of the previous valid block Valid bitcoin transactions Nonce

+ +

slide-57
SLIDE 57

Block mining

Valid hash: 0000000000000000001b13... Nonce increases CPU used in SHA-256

slide-58
SLIDE 58

Tampering with the past

Blocks can be altered locally Hashes become invalid Invalid blocks must be re-mined Attacker must spend CPU

slide-59
SLIDE 59

Single version of truth

Honest chain keeps growing Attacker must outrun network 51% attack would allow this * 10' ?'

slide-60
SLIDE 60

Bitcoin applications beyond cash

slide-61
SLIDE 61

Ethereum, Smart Contracts, and Decentralized Applications

slide-62
SLIDE 62

Contract /ˈkɑːn.trækt/ A legal document that states and explains a formal agreement between two different people or groups,

  • r the agreement itself.
slide-63
SLIDE 63

Ethereum

A computer * Turing-complete language Arbitrarily complex transactions *

slide-64
SLIDE 64

Smart Contracts

Agreement between parties Protocol to perform

  • n promises

Breach is expensive

slide-65
SLIDE 65

Contract design

Who can resolve disputes? Reactive enforcement Proactive enforcement

slide-66
SLIDE 66

Decentralizing contracts

Arbiter replaced by the blockchain Reduced need for trust in humans * Higher degree of automation

slide-67
SLIDE 67

Decentralized apps

Decentralized computing Crowdsourced knowledge Decentralized insurance

Golem Gnosis Etherisk

Decentralized business Decentralized court systems Decentralized digital nations?

Colony Aragon

slide-68
SLIDE 68

The Future of Decentralization