← All calls
ARBORIST#43

612-byte ZSA note ciphertext

A 32-byte ZSA asset identifier is added to the note ciphertext, and Zebra released rc.3.

Agenda summary 6

  1. Zebra rc.3 and the FROST ZIP status

    Zcash Foundation · Pili, Deirdre

    • The Foundation's engineering manager Pili announced that the getblocktemplate RPC implementation is complete. Since it is unclear how to mine blocks on the testnet, the team is testing as thoroughly as possible.
    • Most of the RPCs needed for mining pool support are implemented, and the team plans to settle the minimum RPC set by looking at how many pools actually use them. The fourth release candidate, rc.3, includes the mining pool RPCs and a transaction selection algorithm aligned with the latest ZIP 317.
    • The mining RPCs must be compiled with the getblocktemplate feature enabled and configured, and are still experimental. The goal is to reach a level pools can test by the end of January; it builds blocks but cannot mine, so it has fewer features than zcashd.
    • Deirdre said the ZIP on how to use FROST for Zcash spend authorization signatures is under review. The IETF document has gone through last call and is nearly complete, and since Sapling and Orchard signatures are re-randomized, a variant was defined.
    • The old Rust code for redjubjub and redpallas, based on the RFC draft, will be updated to match the final RFC.
  2. ZSA protocol status - burn and note encryption

    QEDIT · Jon, Vivek

    • The burn feature was implemented and a PR submitted. It is the basic ability to burn a specified amount of a given asset, and work such as the circuit remains.
    • With ZSA, a 32-byte asset identifier is added to the note, making the plaintext grow from 580 to 612 bytes. Changes are needed in three crates (note encryption, orchard and zcash_primitives), and there is a librustzcash PR.
    • On the zcashd client side, a change was made so the RPC shows balances per asset ID, and work is moving toward connecting it with the orchard crate.
    • Reflecting the editors' feedback, the ZIP was split into transfer and issuance in PR 649. A separate ZIP 317b is being organized into a ZSA section merged into ZIP 317.
    • Much of the ZIP's content can be carried over as is into the spec document. Finishing transfer, the remaining circuit work and writing the spec will be done within a month. Jon said a coordination meeting is needed to mesh the ECC and Foundation PRs.
  3. Next ZSA features and the testnet plan

    QEDIT · Jon, Str4d, Daira, Adi

    • Considering first applications such as stablecoins, the team reordered the next features. The first one it wants to implement is Reject Transactions, which refuses receipt when the sender is unknown. It aims to avoid legal problems like those of Tornado Cash.
    • When Adi asked who pays the fee on rejection, Jon answered that the sender bears it, and even if the recipient rejects, someone has to pay since on-chain space was already used. Daira said an on-chain record of acceptance is needed.
    • Str4d recommended implementing ZSA with zcashd's network upgrade feature flag framework. The idea is to merge code without affecting consensus, turn it on in a new testnet, and test it together with the features included in NU6.
    • Daira said a separate testnet would have been useful for Canopy and NU5 as well. Jon introduced a plan to run a ZSA-only testnet timed to Zcon.
  4. ZSA note ciphertext size and the memo field

    Electric Coin Company · Str4d, Vivek, Daira

    • When Str4d asked whether the ciphertext grows to 612 bytes or part of the memo is used, Vivek answered that the memo stays at 512 bytes and the ciphertext grows by 32 bytes.
    • Str4d mentioned the discussion of separating the memo field that could not be included in NU5 because of complexity. If the memo is split off into a separate ciphertext, multiple recipients can read it or it can be removed when not needed. Daira suggested simply growing it at first and consolidating later.
    • The current PR modifies the existing code in the note encryption crate. They said that if a refactor making lengths associated constants is possible, the length drops out of the type and the new feature can be added in an additive form, so they will try to split up the changes.
  5. Core update - TZE and ShardTree

    Electric Coin Company · Str4d, Daira, Kris, Jon

    • A framework that defines consensus features as a graph using the consensus feature enum has already been merged in zcashd and can be found via a synthetic upgrade called Zfuture. A PR adding TZE as a feature is open.
    • TZE stands for Transparent Zcash Extensions, a generalization that sends a UTXO to a precondition and requires a witness to be presented when spending. BOLT (ZK Channels) was the motivation, and it offers a clue for building a shielded version in a future where everything is shielded.
    • Kris submitted a shardtree crate PR. It fills the note commitment tree in arbitrary order, so scanning only the most recent 100 blocks and downloading a few MB of intermediate nodes from lightwalletd makes notes immediately spendable.
    • The change to support shardtree in zcashd will start soon, and connecting it through to lightwalletd will bring the first performance improvement.
    • Halo 2 recursion is being worked on in collaboration with the Filecoin Foundation and the Ethereum Foundation, and the Rust Sapling types are being refactored to be more like Orchard's, making things like hardware wallet support easier.
  6. ZIP 317 preparation and removing deprecated RPCs

    Electric Coin Company · Daira, Kris, Adi, Nate

    • Daira reported that there are corrections to the protocol spec with no consensus impact, and that there is a spec error related to Canopy's ZIP 212.
    • For ZIP 317, the team backported Bitcoin's change to mempool transparent transaction dependency tracking. Some RPCs slated for deprecation change to off by default, and old ones like z_seeraw were deleted. They can be turned on temporarily with a startup option.
    • Kris said the RPC code duplication and technical debt accumulated since 2017 must be cleaned up before ZIP 317 can be implemented in the zcashd wallet.
    • When Adi asked about deprecating dumpwallet, Kris and Daira said it exports only transparent keys and leaves out shielded keys, so use z_exportwallet. From zcashd 4.7.0, recovery is from the mnemonic seed backup.
    • As Nate suggested, Daira checked whether the error messages of deprecated RPCs point to the replacement call, and it already points to z_exportwallet.

This summary is based on the original meeting notes; check them for exact details.