Skip to content

Instantly share code, notes, and snippets.

@mikolalysenko
Last active October 8, 2015 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikolalysenko/fa1403784896870b245f to your computer and use it in GitHub Desktop.
Save mikolalysenko/fa1403784896870b245f to your computer and use it in GitHub Desktop.
Merkleization - sketchy outline

Merkleization

Introduction

Distributed systems

  • Distributed systems = Computers + relativity
  • Different machines have different clocks, perception of time, and views of the state of the system
  • Challenges: Communication failures, hardware failures, latency, bandwidth
  • All computer systems today are distributed at some level (nature obeys relativity after all), the extent to which this nature is exposed depends on the loads put upon the system.

Decentralized systems

  • Decentralized systems = Distributed systems + society
  • Challenges: Jerks, Laws, Powerful incumbents
  • Need trustworthy and robust systems

The great opportunity

  • Combines: [Computer Science, Physics, Economics, Social Justice, Engineering]
  • Decentralized systems can create social change, alter the balance of power
  • How can we make it easier to build them?

Merkleization

Functional data structures

Recap: Object oriented programming

  • The "Java" model (aka pointer machine) (TODO: Look up pointer machine paper)
  • Can allocate finite sized objects
  • Objects can have pointers (aka references) to other objects
  • Can modify these pointers later

Functional programming

  • Cannot modify objects once they are created
  • Consequence: No cycles, graph of object references is a DAG
  • Lots of work in this area, see Okasaki, Bagwell, Clojure, etc.

Merkle DAGs

  • Distributed verification of functional data structures (see dat, IPFS, Git)
  • Idea: Replace pointer with secure hash
  • Works for any functional data structure! Just overload new!

Replicating Merkle DAGs

  • Complexity of Set Disjointness
  • Work on Merkle Trees, BitTorrent

Merkle Tries

  • General solution for replicating dynamic set of objects
  • Merkleized trie of object hashes
  • Maintain (large) set of immutable objects addressed by hashes
  • Finite set of mutable pointers (aka fingers) into the object set
    • Easier to reach consensus/update fingers

Possible applications

  • Can replace most of Google with a secure peer-to-peer system!
    • Search
    • Maps
    • Databases
@wanderer
Copy link

wanderer commented Oct 8, 2015

Map

hmm so would you use a Merkleized r-tree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment