Pages:
Author

Topic: [ANNOUNCE] Webcoin Alpha Sneak Preview - page 2. (Read 17949 times)

full member
Activity: 234
Merit: 100
AKA: Justmoon
Well done Justmoon - very slick ! Now you can go back to betting SC2 GSL...kidding  Grin

Hey if you have too much money, just send it over - you know I have a 100% win rate so far, right? Cheesy

---

Heads up to everyone wanting to try out node-bitcoin-p2p at the moment. The current HEAD of Node.js breaks module compilation: https://github.com/joyent/node/issues/1102

Please wait until fixed or use joyent/node commit 9a3dd754be6531b01c0e when installing Node.
sr. member
Activity: 334
Merit: 250
Well done Justmoon - very slick ! Now you can go back to betting SC2 GSL...kidding  Grin

Look forward to playing with this soon!
full member
Activity: 234
Merit: 100
AKA: Justmoon
I can probably get to the bottom of most of these bugs myself, however the one impacting the use of the test net (where it reports a gibberish error coming back from the creation of the block locator) is probably going to be more difficult (I'm guessing it's an issue in your fork of mongoose...and perhaps in the native code).  Let me know if you have any ideas or tips where to look for a fix for that one.  I'd really like to be able to use testnet (I know you don't think too highly of it, but losing even a few real bitcoins isn't appealing).

When you're trying testnet, are you doing so with booo's patch or with vanilla node-bitcoin-p2p? The current master does not contain the necessary changes to the genesis block at all. Booo's patch does contain them but that's still where I'd be looking for problems. booo's error log looks like the blocks he's downloading don't connect with the chain.

https://github.com/bitcoinjs/node-bitcoin-p2p/issues/8

Btw, I've found the cloud9 IDE and node-inspector (for debugging) to be nice tools.  I wonder if anyone else has any good tools the know of that I should be using.

Some random recommendations: ack is awesome tool for searching source code. I use  Wireshark for debugging the Bitcoin P2P connection as well as the database backend. The latest version even has a filter for MongoDB's protocol, making it a lot easier to debug MongoDB-related problems.

And of course BitcoinJ is great when you need another client to run against that is easy to change and customize.
hero member
Activity: 868
Merit: 1008
Or perhaps you're just posting here to make me aware

No, I'm just not in a good habit of checking there.  Wink

I also see one open on the download getting stuck (https://github.com/bitcoinjs/node-bitcoin-p2p/issues/13).  I'm new to node.js, so I haven't been too certain which issues might be due to my noobness, and which are legitimate bugs.

I can probably get to the bottom of most of these bugs myself, however the one impacting the use of the test net (where it reports a gibberish error coming back from the creation of the block locator) is probably going to be more difficult (I'm guessing it's an issue in your fork of mongoose...and perhaps in the native code).  Let me know if you have any ideas or tips where to look for a fix for that one.  I'd really like to be able to use testnet (I know you don't think too highly of it, but losing even a few real bitcoins isn't appealing).

Btw, I've found the cloud9 IDE and node-inspector (for debugging) to be nice tools.  I wonder if anyone else has any good tools the know of that I should be using.
full member
Activity: 234
Merit: 100
AKA: Justmoon
I get this quite frequently (during block download in particular):

   Error: Socket is not writable

The p2p client dies (well, in this case I'm running the exit node, but it's dying in writing a message to a connection in the p2p code).  Do others get this?  I haven't investigated it much, but I'm guessing it's normal network interruptions and that a bit of exception handling to catch and recover (or just discard that connection) is needed and would fix the issue.

Hehe, you seem to be on a mission to re-report all the bugs from our issue tracker:

https://github.com/bitcoinjs/node-bitcoin-p2p/issues/15

Or perhaps you're just posting here to make me aware - I've now tried to comment on all bugs. At the moment I don't have muchany time to develop, as soon as I do though this stuff will all get fixed swiftly. Unless somebody beats me to it. Smiley


Also, after downloading a 50 or 60 thousand blocks, the block download seems to stall out.  Is that due to some throttling by peers or something?  Or is this a bug?

Please refer to the bug tracker:

https://github.com/bitcoinjs/node-bitcoin-p2p/issues/13
hero member
Activity: 868
Merit: 1008
I get this quite frequently (during block download in particular):

   Error: Socket is not writable

The p2p client dies (well, in this case I'm running the exit node, but it's dying in writing a message to a connection in the p2p code).  Do others get this?  I haven't investigated it much, but I'm guessing it's normal network interruptions and that a bit of exception handling to catch and recover (or just discard that connection) is needed and would fix the issue.

Also, after downloading a 50 or 60 thousand blocks, the block download seems to stall out.  Is that due to some throttling by peers or something?  Or is this a bug?
full member
Activity: 234
Merit: 100
AKA: Justmoon
@justmoon, why did you need to use a forked mongoose with bitcoinjs and why make it a submodule (i.e. why not treat it like as an ordinary module found via NODE_PATH)?

Right now, we're using a hack for adding binary support to mongoose. I've created the necessary classes for a datatype "Buffer" that base64 encodes and decodes everything.

In the future we should implement proper support for Buffers to node-mongodb-native and mongoose, i.e. without conversion to base64 since MongoDB itself actually has excellent support for binary types.

See: https://github.com/bitcoinjs/node-bitcoin-p2p/issues/6

Also, how about setting up a separate forum (maybe a child forum to this one) and IRC channel for bitcoinjs development?  Maybe #bitcoinjs or #bitcoin-devjs?

Right now I'm focused on my own development. I want to launch Webcoin, mainly to prove to myself and the world that BitcoinJS is actually a viable alternative, after that I'll be focusing more on building a community. If you want to start and moderate an IRC channel, feel free to start one and let me know. I'll gladly join whenever I'm on, but please don't expect too much, it's all a lot to handle for me atm.


When running node-bitcoin-exit, I'm getting a lot of this kinds of errors:
22 May 20:47:38 - error: Error while creating block locator: �3�����M�.�ڣ]   ����2x

I've not yet managed to successfully debug what's happening, but wonder if it's affecting others.  I've got things setup to run on the testnet, so I wonder if that might have something to do with it.

Testnet is not supported yet, please use mainnet. (It shouldn't be difficulty to fix, I've just never needed testnet. It's hash rate is too unstable, ironically making it unsuitable for testing imho.)

See: https://github.com/bitcoinjs/node-bitcoin-p2p/issues/8
hero member
Activity: 868
Merit: 1008
When running node-bitcoin-exit, I'm getting a lot of this kinds of errors:
22 May 20:47:38 - error: Error while creating block locator: �3�����M�.�ڣ]   ����2x

I've not yet managed to successfully debug what's happening, but wonder if it's affecting others.  I've got things setup to run on the testnet, so I wonder if that might have something to do with it.
newbie
Activity: 36
Merit: 0
I've managed to run bitcoinjs-gui after lots of trial and error.
Look at http://benreuven.com/udiwiki/index.php?title=Bitcoinjs for details
hero member
Activity: 868
Merit: 1008
@justmoon, why did you need to use a forked mongoose with bitcoinjs and why make it a submodule (i.e. why not treat it like as an ordinary module found via NODE_PATH)?

Also, how about setting up a separate forum (maybe a child forum to this one) and IRC channel for bitcoinjs development?  Maybe #bitcoinjs or #bitcoin-devjs?
full member
Activity: 234
Merit: 100
AKA: Justmoon
Quote from: From Wallet API documentation
Display balance
If some public keys are encrypted (their data starts with “enc!”) the client should mark the balance in parentheses to denote that it may not be the full balance available and update it once the wallet is unlocked.

I think parentheses are bad idea, because in some contexts this is the way to indicate negative account balance. I'd propose square brackets [] or curly brackets {}. Or maybe an question mark at the end.

Good point. I've updated the spec:

https://github.com/bitcoinjs/bitcoinjs.github.com/commit/bdf85186f8e43b4875103d7f09cef0a068f8e298
full member
Activity: 234
Merit: 100
AKA: Justmoon
  $ node-waf configure && node-waf build

I don't think this step is in the README.

I've just looked into it. Normally, npm link should take care of compiling the native parts. But with npm 1.0 it doesn't, because sudo npm link prints this error (but continues anyway):

Code:
npm WARN skipping, cannot run in /atlas/www/p2p-test [email protected] node-waf configure build

Looking at the npm source code - the reason for the problem seems to be that the folder name when you clone it from git (node-bitcoin-p2p) does not have the same name as our npm package (bitcoin-p2p). NPM checks for that and if it doesn't match it considers it "unsafe" to run the build script. Or something like that.

Edit: Nothing to do with the name, probably I'm just doing something wrong. I've opened an issue at npm to get some help.

I'm working on an updated README and will try to figure out a way to get npm link to work properly.

Edit2: Couldn't find a good solution using npm, so I've added an installation step to just call node-waf manually. That fixes it.
hero member
Activity: 607
Merit: 500
Quote from: From Wallet API documentation
Display balance
If some public keys are encrypted (their data starts with “enc!”) the client should mark the balance in parentheses to denote that it may not be the full balance available and update it once the wallet is unlocked.

I think parentheses are bad idea, because in some contexts this is the way to indicate negative account balance. I'd propose square brackets [] or curly brackets {}. Or maybe an question mark at the end.
hero member
Activity: 868
Merit: 1008
I'm actually using OSX at the moment.  I think this is something specific to bitcoin.  The following code appears later in util.js:

   var encodeBase58 = exports.encodeBase58 = ccmodule.base58_encode;

This is why I say that it looks like it might be the base58 code from the C++ client wrapped up to be used from bitcoinjs.  But, when I grab node-bitcoin-p2p, there is no subdirectory called build-cc (as referenced in the require() call in util.js).

EDIT:  Ok, I figured it out...the missing thing I needed to do (from the node-bitcoin-p2p directory):

   $ node-waf configure && node-waf build

The following website on writing native modules gave me the clues I needed to figure it out:
https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/

I don't think this step is in the README.
member
Activity: 102
Merit: 10
Looks that is a compiled module. Did you follow the instructions from github page? Also, do you have 'build-essential' metapackage installed? (I assume you're on ubuntu).
If you install bitcoin-p2p via npm it should do build for you. If you did `git clone` then there was that extra step, that probably bootstraps the native module.
hero member
Activity: 868
Merit: 1008
Could you provide a list of the pre-req modules and where to obtain them?  I tried running p2p and it's looking for the "buffertools" module.  I looked at the node.js modules website and did a bit of googling...got quite a few hits but not sure which is the right one.

Install npmjs, all the modules are installed with this tool.

Thanks, that worked great...but now I'm stuck on "var ccmodule = require('../build-cc/default/native');"  From the looks of it, it is some kind of repackaging of the bitcoin base58 code for nodejs.
member
Activity: 102
Merit: 10
Could you provide a list of the pre-req modules and where to obtain them?  I tried running p2p and it's looking for the "buffertools" module.  I looked at the node.js modules website and did a bit of googling...got quite a few hits but not sure which is the right one.

Install npmjs, all the modules are installed with this tool.
hero member
Activity: 868
Merit: 1008
Could you provide a list of the pre-req modules and where to obtain them?  I tried running p2p and it's looking for the "buffertools" module.  I looked at the node.js modules website and did a bit of googling...got quite a few hits but not sure which is the right one.
hero member
Activity: 607
Merit: 500
This is spectacular. That's all I can say for now, I'm speechless.

Another great work from justmoon.
full member
Activity: 234
Merit: 100
AKA: Justmoon
justmoon, can you clarify; where are the private keys stored esp. in the situation in the future when we have smartphone, laptop, and desktop clients?

I just uploaded the first version of the Wallet API specs:

http://bitcoinjs.org/specs/wallet/1.0/draft/wallet-api.html

Please have a look and we'd be happy to get some comments and criticism.
Pages:
Jump to: