Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Kiaya on July 03, 2013, 02:37:16 PM



Title: Securely watching for transactions on large numbers of addresses.
Post by: Kiaya on July 03, 2013, 02:37:16 PM
Maybe you guys can give me a bit of a steer on this. I'm building a website that is going to contain many tens of thousands of pieces of user generated content, and I want each little chunk of content to have it's own bitcoin address so that people can send the author a tip if they find the content useful (and the author will know exactly which content received the tip).

... so, I'm looking to set up a situation where I have a webserver that is watching large numbers of bitcoin addresses and takes an action when it notices that funds have been received on any of these addresses. Storing the private keys on the server is obviously not an option, and I don't really want to depend on a third party service. As an added complexity, I'd like to use vanity addresses if possible.

I've explored -

1) Using the listsinceblock RPC call to get the latest transactions, but for this to work, it seems I need to have all my addresses, along with private keys, on the webserver. It's looking like there's currently no RPC call in the client that will help me see transactions for keys I don't have imported.

2) Using a deterministic wallet in cold storage: but I'm not sure how I'll go about detecting balance changes without depending on some external service (also, this would make using vanity addresses impossible).

Do you guys know of any best practice here. Am I missing something?



Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: tiktoc on July 03, 2013, 05:51:16 PM
Have a search of both the project development and development forums its discussed often in there.

They reckon bitcoind doesnt scale to well with large wallets, but maybe look at getting watch addresses to work with it (there is a pull request for it) and using -walletnotify?

Or have a look at and speak to the Armory developer or pywallet developer.


Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: Kiaya on July 03, 2013, 06:06:46 PM
Have a search of both the project development and development forums its discussed often in there.

They reckon bitcoind doesnt scale to well with large wallets, but maybe look at getting watch addresses to work with it (there is a pull request for it) and using -walletnotify?

Or have a look at and speak to the Armory developer or pywallet developer.

Thanks for that - will do.


Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: 🏰 TradeFortress 🏰 on July 05, 2013, 09:35:53 AM
Have a search of both the project development and development forums its discussed often in there.

They reckon bitcoind doesnt scale to well with large wallets, but maybe look at getting watch addresses to work with it (there is a pull request for it) and using -walletnotify?

Or have a look at and speak to the Armory developer or pywallet developer.

Thanks for that - will do.
Unless you are using a patched bitcoind, don't bother because it is not going to scale well.


Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: Abdussamad on July 05, 2013, 04:09:15 PM
There is a plugin for wordpress that does this:

http://terk.co/wordpress-bitcoin-tips-plugin/

It uses a free service by blockchain.info. Basically blockchain.info generates a unique address each time you call it and it forwards all bitcoins sent to that address to an address you specify. It also callbacks your script each time someone sends bitcoins so you can keep track of transactions:

http://blockchain.info/api/api_receive


Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: Kiaya on July 05, 2013, 05:27:19 PM
Have a search of both the project development and development forums its discussed often in there.

They reckon bitcoind doesnt scale to well with large wallets, but maybe look at getting watch addresses to work with it (there is a pull request for it) and using -walletnotify?

Or have a look at and speak to the Armory developer or pywallet developer.

Thanks for that - will do.
Unless you are using a patched bitcoind, don't bother because it is not going to scale well.

Thanks for the heads up - many congrats on the Inputs.io launch, BTW.

Incase anyone else is looking into doing this kind of thing, there's a pull request in play - https://github.com/bitcoin/bitcoin/pull/2121.


Title: Re: Securely watching for transactions on large numbers of addresses.
Post by: Dabs on July 10, 2013, 05:09:21 AM
You can make a wallet.dat file which only has the public bitcoin addresses in it, without the private keys, using jackjack's pywallet. Then you can use the -walletnotify to let you know when an address gets a transaction. You will need to put in the (hex) public keys into the file though, derived from the private key.

Your bitcoind can't spend those coins, and if the server is hacked, there are no private keys on it.

This is much better than putting a wallet.dat file with the actual private keys even if it is protected by a long password.