Zecwallet Infra Funding for increased traffic

zcashd now has an RPC that allows LightwalletD to read the sapling root of the latest block, so the LightwalletD can now generate the checkpoint (which is a triplet of (block number, block hash, sapling root)) on the fly, for each block.

This opens up some good options.

  1. We could have new wallets query multiple lightwalletD servers, and if they agree on what the root is at a block, use that.
  2. Get the sapling root from a “trusted” location (instead of from the binary), and compare that against the LightwalletD’s root
  3. Get the n-1 checkpoint, followed by the last n-1 compact blocks, and calculate the latest checkpoint, which should match what the LightwalletD reports
  4. Temporarily trust the LightwalletD’s checkpoint, which will allow the user to start using the wallet immediately. In the background, fetch the blocks from the last known checkpoint, and verify that the LightwalletD is telling us the correct root. Since most new wallets need to receive some funds first before spending, this gives the wallets a few minutes to verify the checkpoints without having to make the user wait.

Some combination of these will likely help, and I can hopefully work with the other wallet developers/ECC’s wallet team to come up with an approach that works.

6 Likes