Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: slothbag on February 18, 2013, 04:00:35 AM



Title: Payment notifications on SPV
Post by: slothbag on February 18, 2013, 04:00:35 AM
I'd like to set up bitcoin payment notifcations but my VPS cannot run the bitcoind full daemon.  Is it possible to run a SPV client as a daemon/cli process to provide payment notifications with a small process footprint?  BitcoinJ looks like the library of choice but I cannot find any daemon/cli implementation of it.

I realise there are many payment notifcation providers and I will probably give them a try. But running my own SPV daemon would remove that dependancy.

Cheers


Title: Re: Payment notifications on SPV
Post by: Mike Hearn on February 18, 2013, 07:39:31 AM
This is a common request. There's no out of the box way to do it but if you want to help build one I'll help you with the design work. Right now bitcoinj is quite mobile focused and the wallet doesn't scale all that well. Somebody stepping up to make it work better for the "nano merchant" use case would be appreciated.


Title: Re: Payment notifications on SPV
Post by: Jouke on February 18, 2013, 07:58:13 AM
What do you mean with: "the wallet doesn't scale all that well".


Title: Re: Payment notifications on SPV
Post by: ThomasV on February 18, 2013, 08:34:48 AM
Electrum has a merchant script that does that.
checkout scripts/merchant.py
https://github.com/spesmilo/electrum/tree/master/scripts


Title: Re: Payment notifications on SPV
Post by: Mike Hearn on February 18, 2013, 09:41:42 AM
What do you mean with: "the wallet doesn't scale all that well".

For instance, it has to be held in RAM. Right now there's no way (without modifying the code a lot) to hold a huge wallet in a database.

Even if there was, the wallet code is written for simplicity and correctness, not speed. It has a bunch of quadratic and worse algorithms in it. So if you have a giant wallet creating spends would take a long time, things like that.

Nothing that can't be fixed, it's just not been a priority.