Author

Topic: [Bounty: 100 YAC] Corrupted YAC Wallet (Read 974 times)

hero member
Activity: 686
Merit: 500
Bitbuy
December 08, 2013, 03: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('  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
sr. member
Activity: 322
Merit: 250
Supersonic
December 08, 2013, 11:49:17 AM
#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('  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?
hero member
Activity: 686
Merit: 500
Bitbuy
December 08, 2013, 07:56:45 AM
#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('  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
sr. member
Activity: 322
Merit: 250
Supersonic
December 05, 2013, 12: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('  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.
hero member
Activity: 686
Merit: 500
Bitbuy
December 05, 2013, 12: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('  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
sr. member
Activity: 322
Merit: 250
Supersonic
December 05, 2013, 12: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('  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
hero member
Activity: 686
Merit: 500
Bitbuy
December 05, 2013, 12: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('  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
sr. member
Activity: 322
Merit: 250
Supersonic
December 05, 2013, 12: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.
hero member
Activity: 686
Merit: 500
Bitbuy
December 05, 2013, 12: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
hero member
Activity: 686
Merit: 500
Bitbuy
December 05, 2013, 11:56:17 AM
#7

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

sr. member
Activity: 476
Merit: 250
hero member
Activity: 686
Merit: 500
Bitbuy
December 05, 2013, 11:19:08 AM
#5
Bump
hero member
Activity: 686
Merit: 500
Bitbuy
December 04, 2013, 10:20:57 AM
#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.
hero member
Activity: 802
Merit: 1003
GCVMMWH
December 04, 2013, 10:16:16 AM
#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
hero member
Activity: 686
Merit: 500
Bitbuy
December 04, 2013, 09:08:35 AM
#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.
hero member
Activity: 686
Merit: 500
Bitbuy
December 04, 2013, 09:05:21 AM
#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.
Jump to: