ZecWallet Desktop Light Client

ZecWallet Desktop Light Client

This proposal describes a shileded-first ZecWallet desktop light client. It will have the exact same functionality of the desktop ZecWallet UI, except it uses the light client protocol to avoid downloading the entire blockchain.

A desktop lightwallet will dramatically improve usability. It will cut the amount of download needed by over 90%, making it much easier to get started with Zcash and send/receive transparent and shielded ZEC easily.

Goals

  • Build a light client library that is usable my multiple wallets
  • Light client library will be able to support mobile companion apps (like the ZecWallet Android App)
  • Support for both transparent and shielded transactions.

Overall Architecture

The core of the client will be a light client library that is written in Rust. It will implement the light client protocol, that

  • Connects to lightwalletd, which can be hosted by any one of:
    • The user's own node or
    • The Zcash Foundation or
    • Community hosted (paid/commercial service)
  • Downloads Compact Blocks from lightwalletd, scans them for shielded transactions belonging to the user
  • Maintains the Sapling note commitment tree
  • Can create and spend transparent UTXOs or sapling notes

Users will be able to choose whether to run their Desktop ZecWallet UI in "full-node" mode or "light-client" mode.

Engineering work items:

  1. Extend lightwalletd to support t-addresses
  2. Migrate Android light protocol SDK to desktop and implement t-address support
  3. Extend ZecWallet to support light client protocol (in addition to the existing full node)

CLI light wallet

In addition, we'll also build a simple command-line interface to the library so the light client wallet will be useable via the command line. This will be written in Rust as well, which will allow zcash light wallets to run on devices like the Raspberry Pi via just the command line. Extending to mobile via companion App

This will allow running the light wallet on headless devices like servers/Raspberry Pi devices etc…, which will additionally allow users to use the light client via the companion app on Android.

Timeline

I estimate this project will take ~10 weeks of work.

Description Time
Build Light Client Rust library that talks to lightwalletd 3 weeks
Add support for transparent addresses to library 2 weeks
Build CLI wallet that can use the library 1 week
ZecWallet UI support 3 weeks
Testing 1 week

FAQs

Why Rust?

The library will be written in Rust, so that it can be used by multiple wallets, like ZecWallet and Zepio. Rust can be:

  • Used by other Rust applications as a Rust/cargo dependency
  • Used by C++/Qt applications like ZecWallet via Rust/ffi
  • Used by Javascript/Nodejs/Electron applications like Zepio via Rust/wasm compilation

Why support t-addresses?

My experience with ZecWallet is that most users critically need t-address support for on-boarding to the wallet. For most users, the first 2 transactions are always t-address transactions.

  • First, they withdraw ZEC from an exchange/hardware wallet to their desktop wallet. This is a t->t Tx, since most exchanges/hardware wallets don't support shielded addresses yet.
  • Second, they move their just-withdrawn to their own z-address via a t->z Tx.

Without support for t-addresses in the wallet, users need too much effort to on-board to the app. They'll need to install another wallet (like the full-node desktop ZecWallet) to withdraw from an exchange and then send it to their light wallet, which will be too much friction

Campaign

Started
2 months ago
Category
Core dev
Funding
1170 / 1170 ZEC
Awarded with 1168.3 ZEC bounty
Proposal has been funded
CLI Light Wallet
2
ZecWallet Light Client

ZecWallet Light Client

Estimate: October 2019
Reward: 585 ZEC
ZecWallet support for the light wallet, allowing ZecWallet users to switch to the light client protocol to avoid downloading the blockchain

Payment Request

The team may request a payout for this milestone at any time.