Skip to content

Instantly share code, notes, and snippets.

@andrewschaaf
Created April 3, 2011 14:42
Show Gist options
  • Save andrewschaaf/900457 to your computer and use it in GitHub Desktop.
Save andrewschaaf/900457 to your computer and use it in GitHub Desktop.

bitcoin-details

  • protocol documentation in wiki
  • sample network traffic, bitcoin messages, keys, ...

bitcoin-mobile-android

Bare-bones initial product

Main
  --> Receive_EnterAmount --> Receive_ShowQRInvoice --> Main
  --> Scan --QR Invoice--> Pay_ConfirmPayment --> Main

Later

  • TX QR codes (so the sender doesn't need to use the internet)
  • use SQLCipher as a drop-in replacement for SQLite
  • forex via {TruCoin, ...}
  • address book
  • key management/backup
  • ...

node-bitcoin-library

  • NodeJS and C
  • encode messages
  • MessageParser
    • parser = new MessageParser
    • socket.on('data', function(data){parser.update(data)})
    • parser.on('version', function(m){if(m.version >= 209){...}})
  • create a {private key, signed transaction message, ...}
  • verify a {transaction, block, ...}

node-bitcoin-node

  • API
  • backed by {Redis, some scalable KV store}
  • massively scalable
  • define a set of VIP peers, try to maintain connections with them
    • e.g. TruCoin EC2 micros in {US-East, Ireland, Singapore}, every mining pool
  • Optionally log each socket data event (with a millisecond timestamp)
  • Explore ways to speed up propagation (e.g. propagating an INV before the (GETDATA, TX) round trip)

node-bitcoin-wallet

  • API
  • backed by {Redis, SQL}
  • optional fine-grained control of which keys to use as inputs

node-bitcoin-mining-pool

  • massively scalable (mining pools are having scaling problems with the original bitcoind)
  • require a 0.001 BTC transaction fee (configurable)
  • public API:
    • check settings (like fee requirements)
    • TCP feed of accepted TXs

hft-exchange

NodeJS user-facing nodes

  • ...

C core

private event stream (append-only)

  • Each event contains some random salt (e.g. 15 bytes)
  • The user who triggered an event (e.g. the buyer in a BID event) gets a copy

public event stream

Each event...

  • corresponds to a private event
  • redacts fields like account_id
  • contains a hash (e.g. 30 bytes) of its private event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment