Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Mushoz on December 04, 2013, 02:05:21 PM



Title: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 04, 2013, 02:05:21 PM
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:

http://i42.tinypic.com/11gj4pe.png

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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 04, 2013, 02:08:35 PM
Maybe you can try to dump the private key and import to new wallet.

How? :)

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.


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Joe_Bauers on December 04, 2013, 03:16:16 PM
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  ;)


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 04, 2013, 03:20:57 PM
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  ;)

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.


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 05, 2013, 04:19:08 PM
Bump


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Ardolafat on December 05, 2013, 04:26:36 PM
https://github.com/bitcoin/bitcoin/pull/1895


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 05, 2013, 04:56:17 PM
https://github.com/bitcoin/bitcoin/pull/1895

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

http://i42.tinypic.com/2ikxkwn.png


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 05, 2013, 05:02:10 PM
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 :)

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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: turtle83 on December 05, 2013, 05:11:19 PM
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 :)

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.


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 05, 2013, 05:19:31 PM
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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: turtle83 on December 05, 2013, 05:29:25 PM
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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 05, 2013, 05:34:47 PM
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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: turtle83 on December 05, 2013, 05:57:23 PM
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.


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 08, 2013, 12:56:45 PM
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 :(


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: turtle83 on December 08, 2013, 04:49:17 PM
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 :(

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


Title: Re: [Bounty: 100 YAC] Corrupted YAC Wallet
Post by: Mushoz on December 08, 2013, 08:04:45 PM
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 :(

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

Yes. :(