Bitcoin Forum
December 16, 2024, 08:20:14 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: wallet glitched  (Read 4249 times)
Tril (OP)
Full Member
***
Offline Offline

Activity: 213
Merit: 100


View Profile
April 30, 2011, 11:53:42 PM
 #1

I have a tx showing 0/unconfirmed, which won't change even if I use -rescan.

Here's what I did:

1. send tx
2. immediately quit bitcoin
3. move wallet.dat aside, replace with a different one
4. run bitcoin. The tx doesn't appear, as expected
5. wait for a new block-  tx appears with 1 confirmation (since this wallet is the recipient)
6. quit bitcoin
7. put original wallet.dat back.
8. tx still stuck at 0/unconfirmed. all other tx have confirmations increasing. -rescan has no effect.

This seems to be a bug, since rescan should work.
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 01, 2011, 12:01:46 AM
 #2

Pretty soon someone knowledgeable is going to come along and say:

"Run bitcoin -debug, double click the transaction, and paste the contents of the Transaction Details window."

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
riX
Sr. Member
****
Offline Offline

Activity: 326
Merit: 254



View Profile
May 01, 2011, 12:12:57 AM
 #3

Or you could check if the transaction made it into the blockchain on blockexplorer.com..

Sorry, I can't help you with your lost password.

PGP key: 0x9F31802C79642F25
Tril (OP)
Full Member
***
Offline Offline

Activity: 213
Merit: 100


View Profile
May 01, 2011, 12:48:32 AM
 #4

I fixed this by restoring a copy of wallet.dat from before I made the tx in question, then running -rescan.  I would still like to know if there's a reason for the behavior I saw. It seems from the warning at http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/ (from the README.txt), that wallets with unprocessed transactions have known issues.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1140


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
May 01, 2011, 12:52:05 AM
 #5

I had the same thing, I recovered by deleting the databases (but not wallet.dat) and then running bitcoin, telling it to connect to another node on my network running bitcoin, so it could redownload the whole block chain without sapping my internet connection.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
randomguy7
Hero Member
*****
Offline Offline

Activity: 527
Merit: 500


View Profile
May 01, 2011, 01:20:55 AM
 #6

How can you make it connect to some specific node? Thats exactly what I need right now Smiley
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5418
Merit: 13505


View Profile
May 01, 2011, 01:23:12 AM
 #7

I think it's a rescan bug.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1140


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
May 01, 2011, 02:19:23 AM
 #8

How can you make it connect to some specific node? Thats exactly what I need right now Smiley

there is a command line option

type bitcoin -? for help

I believe it's -connect=xxx.xxx.xxx.xxx

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
Tril (OP)
Full Member
***
Offline Offline

Activity: 213
Merit: 100


View Profile
May 01, 2011, 05:39:10 AM
 #9

How can you make it connect to some specific node? Thats exactly what I need right now Smiley

there is a command line option

type bitcoin -? for help

I believe it's -connect=xxx.xxx.xxx.xxx

-connect= is correct.  Add -nolisten=1 (which implies -noirc=1) if you don't want other connections either.

From my experience, having only one connection is bad if you're using the wallet with any miners. Bitcoin
often disconnects from peers and incorrectly displays it has a connection, so you'll be behind on the tx pool
quite a bit.  Try to have at least 8 peers when mining!  Also, it's faster to download new blocks
if you have more than 1 peer, since that peer will sometimes throttle/disconnect you.  If you're just
updating blocks and not mining, one peer will work if you're patient, since it will keep retrying.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1189


View Profile WWW
May 01, 2011, 08:42:17 AM
 #10

I have a tx showing 0/unconfirmed, which won't change even if I use -rescan.

Here's what I did:

1. send tx
2. immediately quit bitcoin
3. move wallet.dat aside, replace with a different one
4. run bitcoin. The tx doesn't appear, as expected
5. wait for a new block-  tx appears with 1 confirmation (since this wallet is the recipient)
6. quit bitcoin
7. put original wallet.dat back.
8. tx still stuck at 0/unconfirmed. all other tx have confirmations increasing. -rescan has no effect.

This seems to be a bug, since rescan should work.

Strange indeed, this shouldn't happen. And it definitely shouldn't remain after a rescan. Couple of questions though:
* which version of bitcoin are you using
* you say "since this wallet is the recipient", so you're using an address from the new wallet as destination for a tx from the old one?
* did you only move wallet.dat aside, or the whole datadir?

I do Bitcoin stuff.
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1016


Strength in numbers


View Profile WWW
May 01, 2011, 01:23:04 PM
 #11

This happened to me too.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
Tril (OP)
Full Member
***
Offline Offline

Activity: 213
Merit: 100


View Profile
May 02, 2011, 03:24:45 PM
 #12


Strange indeed, this shouldn't happen. And it definitely shouldn't remain after a rescan. Couple of questions though:
* which version of bitcoin are you using

The problem originally occurred in 0.3.20.2 and I upgraded to 0.3.21 to see if it would fix the problem, and it didn't.  I rescanned in both with no effect.

Quote from: sipa
* you say "since this wallet is the recipient", so you're using an address from the new wallet as destination for a tx from the old one?

yes

Quote from: sipa
* did you only move wallet.dat aside, or the whole datadir?

I only moved wallet.dat aside.

Alex Beckenham
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
May 22, 2011, 11:53:13 AM
 #13

I've got this problem too... deleted everything in the data dir except for:

wallet.dat
blk0001.dat
blkindex.dat

restarted bitcoin with:

bitcoin -addnode=x.x.x.x -rescan -debug

and it still tells me the following is 0/unconfirmed:

Quote
(Uuuh, actually, copy+paste has never worked for me in the Transaction Details window on Windows XP client). I've tried Ctrl-C, Ctrl+Ins, drag-n-drop, right-clicking the text with the mouse... nothing will copy it to the clipboard.


Alex Beckenham
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
May 22, 2011, 12:01:52 PM
 #14



All of these (inputs+outputs) are in blocks as shown by blockexplorer.com.

m0Ray
Sr. Member
****
Offline Offline

Activity: 868
Merit: 251


View Profile
May 22, 2011, 12:04:35 PM
 #15

Try using this code to delete all transactions from wallet, then rescan:
http://m0ray.net/sites/default/files/bitcoin/bc_tx.tar.bz2

Deleting transaction from wallet, AFAIK, is not dangerous because all confirmed transactions are reconstructed during rescan.

Maybe this function must be included in bitcoin/bitcoind.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5418
Merit: 13505


View Profile
May 22, 2011, 12:06:04 PM
 #16

You also need to delete blk0001.dat and blkindex.dat. I think this is a rescan bug.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
May 22, 2011, 12:08:49 PM
 #17

You also need to delete blk0001.dat and blkindex.dat. I think this is a rescan bug.

Damn, really? I just re-downloaded it 2 days ago.

Perhaps it's the node that I'm adding that has a bad copy of it?

Could someone else give me a node to connect to so that I can be sure I'm not getting it from the aforementioned x.x.x.x?

Thanks.

p.s. Thanks for the code m0Ray, it'll be an interesting read, however I haven't compiled C since uni quite a few years ago now.

theymos
Administrator
Legendary
*
Offline Offline

Activity: 5418
Merit: 13505


View Profile
May 22, 2011, 12:12:56 PM
 #18

If you already redownloaded after the problem developed, then doing it again probably won't help. You can't have gotten a bad copy, since Bitcoin checks the blocks before adding them to the database (unless you manually replaced the files).

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1189


View Profile WWW
May 22, 2011, 12:15:43 PM
 #19

You also need to delete blk0001.dat and blkindex.dat. I think this is a rescan bug.

You're right. -rescan only adds missing transactions to the wallet. It doesn't update wallet transactions with missing information from the block chain.

Maybe we need a separate -rescan-full, or change the meaning of -rescan to do this anyway, as a regular rescan is now done immediately anyway?

I do Bitcoin stuff.
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
May 22, 2011, 12:16:32 PM
 #20

If you already redownloaded after the problem developed, then doing it again probably won't help. You can't have gotten a bad copy, since Bitcoin checks the blocks before adding them to the database (unless you manually replaced the files).

Okay uh, I just deleted the block chain before I read your post Tongue

Anyway, I was on 3.20 so I'm getting 3.21 now and obviously I'll be getting the block chain again.

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!