Bitcoin Forum
November 08, 2024, 05:48:49 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Bounty: 100 YAC] Corrupted YAC Wallet  (Read 971 times)
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 04, 2013, 02:05:21 PM
 #1

I have an old backup of a YAC wallet containing ~1600 YACoins, but the wallet seems to be corrupt. When I try to start Yacoin with the wallet.dat in the correct directory I'm getting the following error:



I'm offering 100 YAC to whoever can help me recover my ~1600 YAC.

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 04, 2013, 02:08:35 PM
 #2

Maybe you can try to dump the private key and import to new wallet.

How? Smiley

Edit: I'm not sure if that backup was encrypted. I'm fairly positive it was though, but I know the password, so it shouldn't be an issue.

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Joe_Bauers
Hero Member
*****
Offline Offline

Activity: 802
Merit: 1003


GCVMMWH


View Profile
December 04, 2013, 03:16:16 PM
 #3

Backup your current data folder including wallet.dat   

Go into current folder and delete everything except for wallet.dat

Wait for blockchain to download.

Keep your 100 YAC bounty  Wink
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 04, 2013, 03:20:57 PM
 #4

Backup your current data folder including wallet.dat   

Go into current folder and delete everything except for wallet.dat

Wait for blockchain to download.

Keep your 100 YAC bounty  Wink

Already tried that. I am getting that error with a completely empty data folder except the wallet.dat file.
Removing the wallet.dat as well and Yacoin loads just fine.

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 05, 2013, 04:19:08 PM
 #5

Bump

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Ardolafat
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
December 05, 2013, 04:26:36 PM
 #6

https://github.com/bitcoin/bitcoin/pull/1895
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 05, 2013, 04:56:17 PM
 #7


Thanks for the link! Unfortunately when I use the -salvagewallet option I'm getting a different error:


www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 05, 2013, 05:02:10 PM
 #8

Okay, so I'm looking through the wallet.dat with a hex editor, and I've managed to find the Yacoin public address that contains my Yacoin in plaintext. Where exactly is the private key stored? And how would I decrypt it manually?

Edit: Trying to use pywallet now to salvage the private key. What value should I pass to the --otherversion= switch so it looks for Yacoin addresses rather than Bitcoin?

Edit2: Since addresses are base58 encoded and since Yacoin addresses start with an Y, that would be 31, correct? Let's see if this works Smiley

Edit3: Meh, not working. I've tried the following two commands:

C:\Users\Jaap\Desktop>pywallet.py --datadir="C:\Users\Jaap\AppData\Roaming\YaCoin" --otherversion=31 --dumpwallet

and

C:\Users\Jaap\Desktop>pywallet.py --datadir="C:\Users\Jaap\AppData\Roaming\YaCoin" --otherversion=31 --dumpwallet --passphrase=mypassphrase

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
turtle83
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Supersonic


View Profile WWW
December 05, 2013, 05:11:19 PM
 #9

Okay, so I'm looking through the wallet.dat with a hex editor, and I've managed to find the Yacoin public address that contains my Yacoin in plaintext. Where exactly is the private key stored? And how would I decrypt it manually?

Edit: Trying to use pywallet now to salvage the private key. What value should I pass to the --otherversion= switch so it looks for Yacoin addresses rather than Bitcoin?

Edit2: Since addresses are base58 encoded and since Yacoin addresses start with an Y, that would be 31, correct? Let's see if this works Smiley

was trying pywallet but no luck.
https://github.com/yacoin/yacoin/blob/master/src/base58.h#L279
the otherversion should be 77 based on that but pywallet is still fussing about.
It does dump address and key in some sort of hex but i dunno how to get it into importable format.

Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 05, 2013, 05:19:31 PM
 #10

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
turtle83
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Supersonic


View Profile WWW
December 05, 2013, 05:29:25 PM
 #11

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 05, 2013, 05:34:47 PM
 #12

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Yeah, this wallet is quite old, so it was made with an old version

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
turtle83
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Supersonic


View Profile WWW
December 05, 2013, 05:57:23 PM
 #13

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Yeah, this wallet is quite old, so it was made with an old version
try running it on an old build... and then make a tx to a fresh address on the new wallet... If you know how to build on windows try checking out upto a very early commit. probably mid may, or earlier... or use linux.

I can give it a go on my old client if u send me the wallet and passphrase... but then i wouldnt trust me if i were you.

Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 08, 2013, 12:56:45 PM
 #14

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Yeah, this wallet is quite old, so it was made with an old version
try running it on an old build... and then make a tx to a fresh address on the new wallet... If you know how to build on windows try checking out upto a very early commit. probably mid may, or earlier... or use linux.

I can give it a go on my old client if u send me the wallet and passphrase... but then i wouldnt trust me if i were you.

Still had an old version on my of my mining PCs, but it's crashing with the same error as the one in my first post Sad

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
turtle83
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Supersonic


View Profile WWW
December 08, 2013, 04:49:17 PM
 #15

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Yeah, this wallet is quite old, so it was made with an old version
try running it on an old build... and then make a tx to a fresh address on the new wallet... If you know how to build on windows try checking out upto a very early commit. probably mid may, or earlier... or use linux.

I can give it a go on my old client if u send me the wallet and passphrase... but then i wouldnt trust me if i were you.

Still had an old version on my of my mining PCs, but it's crashing with the same error as the one in my first post Sad

Did you try clearing everything, leaving only the wallet in there and let the blockchain sync as usual?

Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
December 08, 2013, 08:04:45 PM
 #16

Pywallet works fine on a new wallet, but fails on the corrupted wallet. I'm getting the following error:

Traceback (most recent call last):
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
    d['txIn'].append(parse_TxIn(vds))
  File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
    def read_uint32(self): return self._read_num('<I')
  File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

I get the same error on mine as well but client runs fine.

I probably have an ancient version of the client... havent update or launched it in months, just opened today and has a huge blockchain backlog so closed it.

This is on linux btw

Yeah, this wallet is quite old, so it was made with an old version
try running it on an old build... and then make a tx to a fresh address on the new wallet... If you know how to build on windows try checking out upto a very early commit. probably mid may, or earlier... or use linux.

I can give it a go on my old client if u send me the wallet and passphrase... but then i wouldnt trust me if i were you.

Still had an old version on my of my mining PCs, but it's crashing with the same error as the one in my first post Sad

Did you try clearing everything, leaving only the wallet in there and let the blockchain sync as usual?

Yes. Sad

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Pages: [1]
  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!