Bitcoin Forum
November 06, 2024, 09:15:23 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they believe that the creator of this topic displays some red flags which make them high-risk. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1] 2 »  All
  Print  
Author Topic: SatoshiDice - rolled back transactions  (Read 2827 times)
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 24, 2012, 12:03:12 PM
 #1

After playing SatoshiDice for a while my balance was +12 BTC, most of which were unconfirmed. 3 hours later all transactions were confirmed and my balance became +8.8 BTC. In the client I found messages like

Code:
ERROR: FetchInputs() : 9fb6464ed7 mempool Tx prev not found b54902f6eb

and

Code:
CTxMemPool::accept() : accepted 9fb6464ed7 (poolsz 850)
   accepted orphan tx 9fb6464ed7

and

Code:
AddToWallet 08c7855f7e  new
WalletUpdateSpent found spent coin 0.16908152bc 1c2ed3fd7e259bec31d0afcc219372547cc722ff5d52dda80c6dd0b06d832820
NotifyTransactionChanged 1c2ed3fd7e259bec31d0afcc219372547cc722ff5d52dda80c6dd0b06d832820 status=1
WalletUpdateSpent found spent coin 0.08335849bc 4b5bbc5d23c94256ee7e3b79cb775263c5eadefdd68818fca61437c8e88c2251
updateWallet 1c2ed3fd7e259bec31d0afcc219372547cc722ff5d52dda80c6dd0b06d832820 1

Looks like I got double-spent winnings. Am I right?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 24, 2012, 01:06:18 PM
 #2

I'm terribly sorry. It was my fault.
I forgot to switch the bot off and while I was having dinner it awoke after won coins had been confirmed and lost those 3.2 BTC.
F*ing Artificial Intelligence  Grin
hamdi
Hero Member
*****
Offline Offline

Activity: 826
Merit: 500



View Profile
October 24, 2012, 03:39:41 PM
 #3

good luck winning them back Smiley
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 24, 2012, 06:15:57 PM
 #4

good luck winning them back Smiley

Thx. It was easy - 4 BTC on "Less Than 32000" Smiley
lile
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
October 24, 2012, 07:16:09 PM
 #5

You know you're going to be losing money in the long run with satoshidice, right?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 24, 2012, 07:54:44 PM
 #6

You know you're going to be losing money in the long run with satoshidice, right?

I know. Also I know that "the long run" is something like 1000000 bets, so I'm safe if I'm going to play only 1000 ones.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 25, 2012, 07:20:02 PM
 #7

I've caught a rolled back transaction - http://satoshidice.com/full.php?tx=6624703b6ad91c9975be23e534205b7380c9df5c3be083bbc33af013b5649dd5

Here is copy of the page in case it will disappear:

Quote
Transaction 6624703b6ad91c9975be23e534205b7380c9df5c3be083bbc33af013b5649dd5

6624703b6ad91c9975be23e534205b7380c9df5c3be083bbc33af013b5649dd5:0

Processed time: 2012-10-25 07:01:27
Key date: 2012-10-25
Bet: lessthan 32000
Bet TX: 6624703b6ad91c9975be23e534205b7380c9df5c3be083bbc33af013b5649dd5
Payment TX: f2a86c49dc2e406423a48eef17a285c50b5454dd40b904706ad3c56b014ce790
Payment TX Status: UNKNOWN
Bet Amount: 0.12500000
Outcome: WIN
Payment: 0.24998100
Address: 1D8qR2YeM3fWX9iaLKZv4EdUc8FSGb3cWM
Lucky number: 27679
Validation

Secret hashes

Download and verify hash.keys

For more details on the secret keys see secrets

Using correct secret key

Verify that the secret used hashes to the hash listed for for 2012-10-25 in hash.keys
sha256(hidden) -> 91297cce277e5273a9395be10d089dabecfe9e0492d6a0315658bff0905ab9d4

Secret and Transaction Hash

Verify that the hmac sha512 with secret and transaction_id hash to the bet hash
hmac_sha512(hidden,6624703b6ad91c9975be23e534205b7380c9df5c3be083bbc33af013b5649dd5) -> 6c1f3fd44b82f767134501c93ab425a998f06c71707bcd204ba04755b6975ee3 hmac512

Lucky Number

Verify that the first bytes of the bet hash above is the lucky number
6c1f3fd44b82f767134501c93ab425a998f06c71707bcd204ba04755b6975ee3 -> 6c1f -> 27679

Looks like the problem is with BLOCKCHAIN.INFO. And it wasn't a double-spent coins, coz the rolledback transaction was the 1st bet from a freshly created webwallet.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 25, 2012, 07:23:11 PM
 #8

Probably the result of a blockchain reorg AKA orphan block(s).
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 25, 2012, 08:18:09 PM
 #9

Probably the result of a blockchain reorg AKA orphan block(s).

Heh. And now imagine that I bought a cup of tea for that 0.125 BTC from a retailer who accepts unconfirmed transactions. Free tea Smiley
ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
October 25, 2012, 09:25:46 PM
 #10

Probably the result of a blockchain reorg AKA orphan block(s).

Heh. And now imagine that I bought a cup of tea for that 0.125 BTC from a retailer who accepts unconfirmed transactions. Free tea Smiley
How is that different from the official client and orphaned blocks?

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 25, 2012, 09:28:40 PM
 #11

Probably the result of a blockchain reorg AKA orphan block(s).

Heh. And now imagine that I bought a cup of tea for that 0.125 BTC from a retailer who accepts unconfirmed transactions. Free tea Smiley
No.  Your transaction would still be "out there" with miners actively working to include it in a transaction somewhere.  Eventually, unless there was malicious action on your part, the tea vendor would receive their money.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 25, 2012, 09:36:20 PM
 #12

Probably the result of a blockchain reorg AKA orphan block(s).

Heh. And now imagine that I bought a cup of tea for that 0.125 BTC from a retailer who accepts unconfirmed transactions. Free tea Smiley
How is that different from the official client and orphaned blocks?

Do u mean it's by Bitcoin design?
Those coins weren't double-spent ones and my transaction had miner fee. The transaction wasn't included in any block, so orphaned blocks are not the issue. There is some other problem and if I had a lot of money in bitcoins I would start to worry about it right now, coz if the network can "forget" transactions then some things must be tuned better, much better if we wish Bitcoin to be adopted by serious businessmen.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 25, 2012, 09:37:35 PM
 #13

No.  Your transaction would still be "out there" with miners actively working to include it in a transaction somewhere.  Eventually, unless there was malicious action on your part, the tea vendor would receive their money.

It was shown in the blockchain.info interface. Now it isn't. Something went wrong.
MPOE-PR
Hero Member
*****
Offline Offline

Activity: 756
Merit: 522



View Profile
October 26, 2012, 03:31:13 AM
 #14

No.  Your transaction would still be "out there" with miners actively working to include it in a transaction somewhere.  Eventually, unless there was malicious action on your part, the tea vendor would receive their money.

It was shown in the blockchain.info interface. Now it isn't. Something went wrong.

This is mildly concerning. As he points out, valid transactions from orphaned blocks do make it into the main chain.

My Credentials  | THE BTC Stock Exchange | I have my very own anthology! | Use bitcointa.lk, it's like this one but better.
piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
October 26, 2012, 11:23:53 AM
 #15

If SatoshiDICE received the transaction then it was broadcast correctly. Blockchain.info will remove transactions after 24 hours unconfirmed. The problem is with the bitcoin network / miners have trouble with large chains of unconfirmed transactions. Since the memory pool of bitcoind miners is limited sometimes if an unconfirmed chain reaches a certain size the transactions at the beginning maybe pushed out of the memory pool. Meaning the rest cannot confirm.

I can improve this our side by preventing long chains of transactions from being spent. However a better fix would be for the big mining pools to significantly increase their memory pool size (and never drop large transactions).

Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 26, 2012, 11:37:26 AM
 #16

If SatoshiDICE received the transaction then it was broadcast correctly. Blockchain.info will remove transactions after 24 hours unconfirmed. The problem is with the bitcoin network / miners have trouble with large chains of unconfirmed transactions. Since the memory pool of bitcoind miners is limited sometimes if an unconfirmed chain reaches a certain size the transactions at the beginning maybe pushed out of the memory pool. Meaning the rest cannot confirm.

I can improve this our side by preventing long chains of transactions from being spent. However a better fix would be for the big mining pools to significantly increase their memory pool size (and never drop large transactions).

Thx for the explanation. Good news are that it's not an issue in Bitcoin design but just in its implementation.
piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
October 26, 2012, 12:18:25 PM
 #17

Ok I've add a new job called PushStuckMyWalletTransactions() which will re-broadcast all My Wallet transactions older than 3 hours every hour. Hopefully this should be enough to keep all our transactions in miners memory pools. I've also increased the expiry time of transactions to 48 hours, since transactions generally seem to be taking longer to confirm nowadays.

Previous this job was called PushMyWalletTransactionsWithPoorPropagation() which would re-broadcast transactions which are not being accepted fully by nodes. However the problem isn't that the transactions aren't been accepted, it's that are being dropped at a later date.

Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
October 26, 2012, 12:34:05 PM
 #18

I still don't understand why there are blocks with 10-20 transactions when there are 500+ transactions with fees waiting to be included. Why the hell pools don't include them?
MPOE-PR
Hero Member
*****
Offline Offline

Activity: 756
Merit: 522



View Profile
October 26, 2012, 10:34:36 PM
 #19

I still don't understand why there are blocks with 10-20 transactions when there are 500+ transactions with fees waiting to be included. Why the hell pools don't include them?

At some point there was a large-ish miner who accepted no transactions whatsoever. Fact is miners aren't required to accept transactions, and since the fees are tiny at the moment as compared to block reward this may happen.

My Credentials  | THE BTC Stock Exchange | I have my very own anthology! | Use bitcointa.lk, it's like this one but better.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 26, 2012, 10:40:27 PM
 #20

I still don't understand why there are blocks with 10-20 transactions when there are 500+ transactions with fees waiting to be included. Why the hell pools don't include them?
Because larger blocks increase propagation time, increasing the risk that the pool's block ends up orphaned, decreasing the overall pay for the miners on average.  No one wants to be part of a pool with a large orphan block rate.

If I was running a pool, I probably wouldn't include transactions without a fee at all.  Any increase in propagation time is less potential payout for my mining minions.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!