Author

Topic: Validating transactions with 0 confirmations (Read 1070 times)

legendary
Activity: 1526
Merit: 1134
December 03, 2012, 06:30:11 PM
#9
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.
newbie
Activity: 56
Merit: 0
December 03, 2012, 05:52:00 PM
#8
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.
newbie
Activity: 49
Merit: 0
December 03, 2012, 04:18:13 PM
#7
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?
donator
Activity: 2058
Merit: 1054
December 03, 2012, 06:26:41 AM
#6
Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.

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?
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.
newbie
Activity: 49
Merit: 0
December 03, 2012, 03:08:00 AM
#5
Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.

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?
newbie
Activity: 56
Merit: 0
November 30, 2012, 07:08:39 PM
#4
Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.
staff
Activity: 4284
Merit: 8808
November 30, 2012, 06:59:23 PM
#3
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)
hero member
Activity: 1078
Merit: 502
November 30, 2012, 06:38:06 PM
#2
This would only be so for instant gambling sites such a 1dice.


newbie
Activity: 49
Merit: 0
November 30, 2012, 06:33:30 PM
#1
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?
Jump to: