5
1
I would like to create a python script that listens to the bitcoin network and monitors some addresses, stored in a mysql db. As soon as a transaction is broadcast with one of these addresses as an output, the script should run a function.
I do not need to store the whole blockchain, nor do I want to. The private keys are also not on the same machine, for security. There is no wallet on this machine, just a list of addresses in a DB.
For the moment I have implemented this with the webhooks from blockchain.info and also tested with blocktrail. It works but it does not work fast enough te achieve my goals, these solutions are just too slow to be practical. I need to be notified instantly.
I've looked at several options but none seem to fit as a good starting point. (BitcoinJ seems the closest but it is in Java) I cannot believe there is no such thing in existence, I just couldn't find one.
So, can you steer me in the right direction?
I haven't looked at the problem this way. It is very true what you are saying. I need validated transactions and I need more than zero confirmations, yes. BUT, what I'm trying to achieve is that a customer can pay me instore at our POS. I can't tell my customer hey wait a couple of minutes 'till I get x confirmations. He's used to instant verification of his debit/creditcard. I think I will need to implement levels of amount versus confirmations, like under $10 value = 0 conf, $100=1, ..., and $10.000+ = 6 conf. – Dennis Decoene – 2015-10-22T14:54:18.237
You can't safely do this with Bitcoin, it is not designed for it. Pretending otherwise can leave you an unlimited amount of money out of pocket, companies have lost hundreds of thousands of dollars to very unsophisticated attacks against zero confirmation transactions. Possibly with payment channels in the future instant transactions with Bitcoin might be an option, but not today. – Anonymous – 2015-10-22T15:11:13.207
OT Danger: It is my desire to help make crypto's mainstream. I'm a founder of Ieper bitcoincity www.ieperbitcoinstad.be and involved in a similar project in Kortrijk, both in Belgium. To do this, we cannot use an altcoin, that could address these problems. All people know right now is Bitcoin. They have heard about it somewhere. We inform people with our initiatives. To get the ball rolling I wanted to offer storekeepers a platform for accepting BTC and get EUR deposited on their account, like bitpay and bitkassa, just local, Belgian, trusted. Aim is to help transition. How to they do it then? – Dennis Decoene – 2015-10-22T19:14:34.253
The longer term goal of my platform is that storekeepers will say 'hey, I don't need to convert to Eur no more, I can pay my suppliers with BTC'. This could then create an ecosystem that is sustainable. I compare BTC to internet in '93. People wondered what that http or @ meant and such. Now we are the pioneers in the financial revolution. Revolutions are risky ;-) I've never shied away from (calculated) risks. I'm not planning on going bankrupt but completely safe is an illusion in business anyhow. Thank you for your welcome input sir I really appreciate it. – Dennis Decoene – 2015-10-22T19:20:50.650
1Nobility doesn't solve technical issues though – Anonymous – 2015-10-23T03:22:17.757