Title: Validating transactions with 0 confirmations Post by: joelnet on November 30, 2012, 11:33:30 PM I see a lot of bitcoin gambling sites that do not require any confirmations.
How are they able to do this? Can someone provide some explanation for me or some links? Title: Re: Validating transactions with 0 confirmations Post by: AndrewBUD on November 30, 2012, 11:38:06 PM This would only be so for instant gambling sites such a 1dice.
Title: Re: Validating transactions with 0 confirmations Post by: gmaxwell on November 30, 2012, 11:59:23 PM I see a lot of bitcoin gambling sites that do not require any confirmations. How are they able to do this? Can someone provide some explanation for me or some links? It's no big deal to accept only one confirmation transactions so long as you don't allow withdraws of derived funds until after the payment confirms. (there is still some exposure where someone double spends their input only when they would have lost— but a gambling site may consider that an acceptable risk) Title: Re: Validating transactions with 0 confirmations Post by: J-Norm on December 01, 2012, 12:08:39 AM Two ways I know of:
Title: Re: Validating transactions with 0 confirmations Post by: joelnet on December 03, 2012, 08:08:00 AM Two ways I know of:
Okay, regarding the first. I'm assuming this is how satoshi dice does it. How can they use my payment if their payment addresses are global pools? Is there an article that describes satoshi dice's technique? Title: Re: Validating transactions with 0 confirmations Post by: Meni Rosenfeld on December 03, 2012, 11:26:41 AM Two ways I know of:
Okay, regarding the first. I'm assuming this is how satoshi dice does it. How can they use my payment if their payment addresses are global pools? Is there an article that describes satoshi dice's technique? Title: Re: Validating transactions with 0 confirmations Post by: joelnet on December 03, 2012, 09:18:13 PM Bitcoin works with outputs, not addresses. They spend the output of the transaction you used to pay them as one of the inputs to the transaction they use to pay you. If the first transaction becomes invalid, so will the second one. The bulk of the value for the second transaction will be from an unrelated output. I'm looking at the api call list for bitcoind and I'm using sendfrom or sendmany. but those send from an "account" and not a transaction. https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list I'm guessing this will only work if I generate a raw transaction. Sorry for being a dumdum, but can I get a little more detail on this? Title: Re: Validating transactions with 0 confirmations Post by: J-Norm on December 03, 2012, 10:52:00 PM I think they probably create their own raw transaction and have the client sign and send it. I am not sure what backend they are using, but I think almost all of them allow for custom made transactions.
Title: Re: Validating transactions with 0 confirmations Post by: Mike Hearn on December 03, 2012, 11:30:11 PM SatoshiDice is based on a fork of bitcoinj. You can't do it with the regular bitcoinj json api.
Actually some of the code is open source: http://code.google.com/r/fireduck-magicpony/source/list Unfortunately fireducks changes weren't really written to be re-usable. Most of them are scalability related anyway. If your site is less popular than SD you could probably get by with the default code. |