BitcoinJS Webtuesday Presentation
Upcoming SlideShare
Loading in...5
×
 

BitcoinJS Webtuesday Presentation

on

  • 665 views

 

Statistics

Views

Total Views
665
Views on SlideShare
665
Embed Views
0

Actions

Likes
0
Downloads
18
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

BitcoinJS Webtuesday Presentation BitcoinJS Webtuesday Presentation Presentation Transcript

  • Stefan Thomas • WeUseCoins.com$ BitcoinJS A divorce and new beginnings www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login - Web developer 13 years www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login - Web developer 13 years - Bitcoin evangelist www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login - Web developer 13 years - Bitcoin evangelist 6 months www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login - Web developer 13 years - Bitcoin evangelist 6 months www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ login - Web developer 13 years - Bitcoin evangelist 6 months www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ ls- What’s Bitcoin? (1 slide version)- Things that are... sub-optimal- Node.js to the rescue! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ man bitcoin www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ man bitcoin- Limited set of tokens www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ man bitcoin- Limited set of tokens- Decentralized www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ man bitcoin- Limited set of tokens- Decentralized- Open-Source www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ man bitcoin- Limited set of tokens- Decentralized- Open-Source= Internet Money www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat x 140000 www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat x 140000= 620 MB www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat x 140000= 620 MB => 6-24 hours www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wget blk*.dat x 140000= 620 MB => 6-24 hours www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.dat www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.datVirtualBox Dropbox Ironkey + Truecrypt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.datVirtualBox Dropbox Ironkey + Truecrypt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.datVirtualBox Dropbox Ironkey + Truecrypt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.datVirtualBox Dropbox Ironkey + Truecrypt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.datVirtualBox Dropbox Ironkey + Truecrypt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.dat www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ rm wallet.dat www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0These additions include nine new SCADA exploits, improved 64-bit Linux payloads, exploits for Firefox and Internet Explorer,full-HTTPS and HTTP Meterpreter stagers, and post-exploitationmodules for dumping passwords from Outlook, WSFTP,CoreFTP, SmartFTP, TotalCommander, BitCoin and many otherapplications. www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0These additions include nine new SCADA exploits, improved 64-bit Linux payloads, exploits for Firefox and Internet Explorer,full-HTTPS and HTTP Meterpreter stagers, and post-exploitationmodules for dumping passwords from Outlook, WSFTP,CoreFTP, SmartFTP, TotalCommander, BitCoin and many otherapplications. www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0blah new post exploitation modules www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0blah new post exploitation modulesblah blah for dumping passwords blah www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0blah new post exploitation modulesblah blah for dumping passwords blahBlah, BitCoin, Blah, … www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ scp wallet.datMetasploit 4.0blah new post exploitation modulesblah blah for dumping passwords blahBlah, BitCoin, Blah, … www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txtBlock chain www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ uml blockchain www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txtBlock chain www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txtBlock chain UI www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txtBlock chain UI Wallet www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet• HUGE!!• Global• Public www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet • HUGE!! • Global • Public-> Server www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet • HUGE!! • Complex • Global • Personal • Public • Private-> Server www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet • HUGE!! • Complex • Global • Personal • Public • Private-> Server -> Client www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet • HUGE!! • Complex • Simple • Global • Personal • Personal • Public • Private • Secret!!-> Server -> Client www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ cat cmn_sense.txt Block chain UI Wallet • HUGE!! • Complex • Simple • Global • Personal • Personal • Public • Private • Secret!! (ideally)-> Server -> Client -> Hardware www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node• Realtime www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node• Realtime• JSON-RPC www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node• Realtime• JSON-RPC• Lots of concurrent users www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node• Realtime• JSON-RPC• Lots of concurrent users www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ find platformBlock chain server• Peer-to-peer node• Realtime• JSON-RPC• Lots of concurrent users + www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsMemory leaks! Example: MongooseJS www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsMemory leaks! Example: MongooseJSCollection.prototype.addQueue = function (name, args) { this.queue.push([name, args]); return this;};Collection.prototype.doQueue = function () { for (var i = 0, l = this.queue.length; i < l; i++){ this[this.queue[i][0]].apply(this, this.queue[i][1]); } return this;}; www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js Memory leaks! Example: MongooseJS Collection.prototype.addQueue = function (name, args) { this.queue.push([name, args]); return this; }; Collection.prototype.doQueue = function () { for (var i = 0, l = this.queue.length; i < l; i++){ this[this.queue[i][0]].apply(this, this.queue[i][1]); }+ this.queue = []; return this; }; www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsMemory leaks! Example: node-binarysaw.chain = function () { var ch = Traverse(saw.handlers).map(function (node) { // ... if (typeof node === function) { this.update(function () { saw.actions.push({ path : ps, args : [].slice.call(arguments) }); return ch; }); } www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js Lesson www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js LessonNode.js librariescan be strange www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js LessonNode.js librariescan be strange www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js LessonNode.js librariescan be strangeBut overall it’snot that bad! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js Lesson Also:Node.js libraries V8’s GC is very good!can be strangeBut overall it’snot that bad! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsDebugging Tip: “LiveObjectList”Getting set up# Compile V8 with LiveObjectList supportscons liveobjectlist=on ...# Run your program with debuggingnode --debug my_leaky_program.js# Connect to your program with D8d8 --remote_debugger www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsDebugging Tip: “LiveObjectList”Usagelol c Capture a heap snapshotlol Show heap snapshotslol list List objects in a snapshotlol diff [s1] [s2] Show differences between snapshotslol path [obj_id] Show retaining paths for an object www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsmoon@clymene:~/opt/node$ deps/v8/d8 --remote_debugger> Type: connectV8-Version: 3.1.8.26Protocol-Version: 1Embedding-Host: node v0.4.10stoppeddbg> lol cCaptured live object list 1: count 156079 size 8129300dbg> c(running)>stoppeddbg> lol cCaptured live object list 2: count 173343 size 8374416dbg> www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.jsdbg> gcGC 7809868 => 6710536 (7.4M => 6.4M)dbg> lol diff 1 2 v t Array 1000objects: [ 1] @222138: size 16, 0xb39bd329 <JSArray> len 0 [ 2] @222139: size 16, 0xb39bd339 <JSArray> len 0 [ 3] @222143: size 16, 0xb39bd3a1 <JSArray> len 0 [ 4] @222144: size 16, 0xb39bd3b1 <JSArray> len 0 [ 5] @222145: size 16, 0xb39bd3c1 <JSArray> len 0 [ 6] @222365: size 16, 0xb39bede5 <JSArray> len 0 [ 7] @222498: size 16, 0xb39bfea5 <JSArray> len 0 [ 8] @222615: size 16, 0xb39c0d55 <JSArray> len 3...dbg> lol path @222138 www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ d8 server.js | | V[274] @79332 0xb4422699: size 20 : HeapObject DescriptorArray FixedArray0xb4422699: [FixedArray] - length: 3 [0]: 0xb77b3efd <FixedArray[53]> [1]: 0xb577404d <undefined> [2]: 0xb41eddd9 <JS array[0]> | | V[275] @215108 0xb41eddd9: size 16 : HeapObject JSObject JSArray0xb41eddd9: [JSObject] - map = 0xb5754861 - prototype = 0xb77b4f49 { #length: 0xb577e581 <Proxy> (callback) #_cast: (null descriptor) }===================================== www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ uname -aAnother thing… 32 bit 64 bit www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ uname -aAnother thing… 32 bit 64 bit- V8 heap limit 1 GB 1.9 GB www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ uname -aAnother thing… 32 bit 64 bit- V8 heap limit 1 GB 1.9 GB- MongoDB database 2.5 GB www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ bitcoinjs runNow STOP! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ bitcoinjs runNow STOP!Demo time! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ forecastLots more to be done!- GUI- Wallet- Shopping Cart Interface www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ git clone bitcoinjs-guiA matching client!- JS-based crypto (fun stuff!) www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ git clone bitcoinjs-guiA matching client!- JS-based crypto (fun stuff!)- HTML5 LocalStorage www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ git clone bitcoinjs-guiA matching client!- JS-based crypto (fun stuff!)- HTML5 LocalStorage- Socket.IO www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ git clone bitcoinjs-guiA matching client! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ git clone bitcoinjs-guiA matching client!- Beta August 2011- Screencast: http:/ /www.youtube.com/watch?v=KTmFwnIRG9c www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wallet 2.0Ideas for a more secure wallet www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wallet 2.0Ideas for a more secure wallet- Deterministic Wallet www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wallet 2.0Ideas for a more secure wallet- Deterministic Wallet- Distributed Key Generation www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ wallet 2.0Ideas for a more secure wallet- Deterministic Wallet- Distributed Key Generation- Hardware Device www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ exitThank youAnd good night! www.bitcoinjs.org Creative Commons 3.0 Attribution
  • $ tail -f github.com/bitcoinjs @bitcoinjs Meetup this Saturday! Oliver Twist Pub 16:30 www.bitcoinjs.org Creative Commons 3.0 Attribution