Zecwallet lite with Nu6 + zip317 support

Hello friends, how you doing today?
So, I noticed that recently many old zcash users are having some trouble recovering their funds from Zecwallet lite.
I know recently, the user @emersonian released a zecwallet-lite fix with working servers and high transaction fee.

But now with the Nu6 activation, I believe even his version is outdated.

The user @Edicksonjga invited me to a group discussion about recovering ZECs from ZecWallet, and since I have a good experience with zecwallet codebase, I decided to do some more fixes and updates.

Backend fixes:

  • Support for Nu6 branch id / tx version.
  • A naive implementation of proportional fees (zip317).
  • Minor changes on grpc connector.
  • Some UAs causes the lib to panic (unwrap on None), so I added an error handling code.

Frontend fixes:

  • Fixed ā€œExport all private keysā€ menu item (sapling and transparent, no orchard)
  • A small synchronization logic change.
  • Added a field on recovery screen, that allow the user to determine how many addresses to generate before synching.

Screenshots:

If the user has a zecwallet-light-wallet.dat file, the wallet will start the sync process:

If the user wants to recover a wallet, now they can inform the number of addresses to recover:

Example of a successful transaction:

Export private keys screen was fixed, displaying private key and address:

Drawbacks and issues

  • Naive zip317
    • While the code works, the implementaion is solely based on number of input and output notes.
    • Since we don’t know the fee before selecting the notes, the front-end doesn’t display the fee to the user. The fee will be automatically deduced from the sent amount.
    • I don’t have time, incentive, or even the knowledge to do a proper implementation.
  • gRPC fails
    • Sometimes, specially with large number of addresses, the grpc connector will fail, making the sync process even slower.

Even though every test I did (send sapling, send orchard, send multiple notes, send mixed notes, send with change, send all) worked, I cannot guarantee it will work for everyone.

Source code

The source code is available here: GitHub - james-katz/zecwallet-lite-nu6

I still don’t know if i’m going to release binary / executable files, even though I have some degree of trust by the community, I don’t want to encourage anyone to download random wallets they find online, promising to ā€œrecover your fundsā€. This could be a bad precedence.

But I’ll be more than glad to discuss the code, for anyone who wants to understand what I did, and help compile the code from source, if anyone has any interest in this project.

If anything, I just learned a lot about Rust and librustzcash (though a pretty old version).

That’s all, bye :upside_down_face:

23 Likes

Outstanding! Thank you :heart_eyes: :zebra: :+1: :student:

3 Likes

Thanks for your hard work @james_katz !

3 Likes

James, I’m very happy to see what you’ve achieved with your work, and it’s gratifying to see your development over the years we’ve been in the community, congratulations.

3 Likes

Great work @james_katz :clap:t2:

4 Likes

im calling u now the brazilian hanh (wizard)

7 Likes

This is great. It’s interesting to see somewhat-working Zecwallet forks emerging from being a zombie project.

Do you think that it would make sense for Zecwallet Lite to get maintained again in a more official capacity or is it a lost cause for some reason?

See the recent Zondax fork of Zecwallet Lite, unfortunately the only way to use the new Ledger support for shielded Zcash:

@ainhoa-zondax - Does the Zondax fork fix the same things as the @james_katz fork? Does Zondax intend to maintain its fork for a period of time?

There could be community support for keeping that going, and enough of us familiar enough to keep the pull requests coming upon major upgrades.

1 Like

As far as I can tell, they also fixed the Nu6 branch id and proportional fees.

In my personal opinion, ZecWallet shouldn’t be revived and maintained, there are much better options nowadays like Zingo, which is, IMO, a spiritual successor of ZecWallet.

But I have a good understanding of ZecWallet lite’s source code, if it’s going to be a thing, I’ll be really happy to help.

2 Likes

Would be nice if we could get the Zecwallet website to notify users of the issues and point to your updated version.

CC @adityapk00

1 Like

Outstanding!

@Shawn He has posted anything in a long time

zingo-pc is a fork of zecwallet-lite that has been working ā€œthe whole timeā€.

I believe that ( and @Juanky or @Edicksonjga will correct me if I am wrong ) it fully supports NU6 and ZIP317.

2 Likes

I’d really love to get you more actively/directly involved with zingo-pc.

2 Likes

That’s right, it supports ZIP320, 317 and NU6.

3 Likes

Hey James!I’m compiling ur zecwallet lite all goes good.It showed this in console when app start sync

[1] [electronmon] waiting for a change to restart it
[1] An error occurred: , Error: Invalid header: Does not start with Cr24
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0

1 Like

Hey James!I’m compiling ur zecwallet lite all goes good.I need ur help here.It showed an error in console when app start sync

[1] [electronmon] waiting for a change to restart it
[1] An error occurred: , Error: Invalid header: Does not start with Cr24
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0
[1] id: 1, batch: 0/1132, blocks: 0/1000, decryptions: 0, tx_scan: 0

Hi, how you’re doing?

So, it looks like an electron (frontend) error.
Does the app start? If so, you can ignore and just wait for you wallet to sync.

If it doesn’t start, how did you compiled it?
The way it worked for me (linux) was compiling and running the .AppImage
IIRC:

yarn dist:linux

OR

yarn dist:win

OR

yarn dist:mac

If it doesn’t work, you can try directly with zecwallet-cli: GitHub - james-katz/zecwallet-light-cli: Zecwallet Lightclient Library and CLI interface Fee Hot Fix

There are topics on this forum explaining how to use it, I can get the links if you want.

My recommendation is to export the mnemonic phrase or individual private keys and import them into a newer wallet, like zingo, zkool or zashi.

If you did not create multiple accounts, you can also try with ZExCavator: GitHub - zingolabs/zexcavator: Universal ZCash Wallet Recovery Tool .

1 Like

We’re prioritizing completing multi-key recovery via ZExCavator. That will address some known cases where ZEC has been difficult to recover due to the multi-sapling key interface offered in legacy ZECWallet. I am uncertain whether it’s directly relevant for this error.

1 Like