PIVX-Project / PET4L

PIVX Emergency Tool for Ledger - Spend PIV from a seemingly "Stuck" Ledger wallet
MIT License
10 stars 12 forks source link

Ledger cannot spend outputs of de-shield (z->t) transactions #15

Open StarFlowerStar opened 3 years ago

StarFlowerStar commented 3 years ago

Hello Everyone. That PIVX is one of the best cryptos, I do not need to tell you. Because of it, i bought many of them and stored them in my Ledger. Because of aiming to try cold staking I downloaded Pivx Wallet 5.3.1. Afterwards i sended my PIVs to that wallet. A little to fast, because I did not prepair anythink, so i sended them back to my Ledger on other account after shielding them. The transactions have been confirmed by the blockchain. On the day i did it, the coins have been shown on Ledger Live, as well,too. But after this I was unable to send the coins again. Everytime Ledger sended another error (example 25). Because of thinking on usb connectivity problems, i used my other computer. Synced everything: The coins had been back in the old account. Trying to send them is not possible. (every trial is an unconfirmed transaction - no wonder: the wallet is empty.). I synced ledger live many times with blockchain again, but they are not in the "new account". This one is not even found anymore. I updated pivx app from ledger live as well,too.

In the end I researched on the net and found PET4L. I connected to Los Angeles from Randomzebra and the ledger, searched for adressess of the coins: they were found... (correct number, not like displayed on ledger). So i wanted to send them to another pivx wallet, to get them back... But everytime i click on send (after entering adress) the following happens:

Time : Preparing transaction. Please wait... Time: HW: Preparing transfer TX Time: Error while communicating with Ledger hardware wallet. EXCEPTION caller : process_ledger_exceptions_int function : prepare_transfer_tx_bulk err: ('unsupported varint',) ===> Error while communicating with Ledger hardware wallet. Time: Closing LEDGER client EXCEPTION caller : func_int function : prepare_transfer_tx_bulk err: Error while communicating with Ledger hardware wallet. ===> Ledger - generic exception Time: Closing LEDGER client

PET4L does not ask to sign transaction - the ledger nano does not display anything . Nothing happens, only this bug report is displayed in the console log. I hope there is someone who has an idea in how to save my coins.

Kind regards StarFlowerStar

AlmCoding commented 2 years ago

Hmm today I used the PET4L to send some non-shielded cold staked PIV to another wallet (It worked perfectly fine - I am using the Ledger Nano X with the 2.0.0 FW version).

I am new to PIVX as well so I might say something stupid now (correct me if 'm wrong) When sending your shielded PIV (zPIV) to your ledger, did you use a shielded destination address? Shielded addresses start with 'ps'...

StarFlowerStar commented 2 years ago

Hi AlmCoding, thanks for your reply. I sended the PIVs from a shielded adress (Pivx Wallet) to an unshielded adress (Ledger Nano S).

Another update: Ledger displays the real amount and Pivx on the right accounts now. But it is still impossible to send them.

Error displayed in Ledger Live: Sorry, try again. The server could not handle your request. Please try again later or contact ledger support. API HTTP 500

Would be great if you have any clues for me how to recover my PIVs.

kind regards StarFlowerStar

random-zebra commented 2 years ago

Hi @StarFlowerStar . It looks like Ledger indeed has issues when spending the outputs of de-shielding transactions. For Ledger Live, I suggest to submit a ticket with Ledger support at https://support.ledger.com/. For PET4L I will try to work on this issue as soon as time permits.

In the meantime, you can access your coins by extracting the private key from the mnemonic phrase and importing it in the PIVX Core wallet:

  1. to generate the private key from the mnemonic, you can use tools such as https://github.com/random-zebra/bip39. I suggest to do this completely off-line. Be sure to insert the correct derivation path, double check the address, and copy the corresponding private key.
  2. From the console of a PIVX Core wallet, use the rpc importprivkey to import the key in the wallet, and rescan (insert help importprivkey for more info). After the rescan you will be able to spend the coins directly from the Core wallet.