Skip to content

Shielded Transactions

Chris Sulmone edited this page Jan 26, 2018 · 3 revisions

In progress on branch feature/SHIELD

Overview

A shielded transaction is an encrypted spending note stored on the blockchain. The encrypted note is called a "commitment" and a spent encrypted note is called a "nullifier". In order to make a shielded transaction both a nullifier and a commitment must be present.

Commitments and nullifiers can only be decrypted by parties with the relevant secret keys. This is necessary in order to know an account's balance or to create a new set of nullifier/commitment for a future transaction.

In order for the ZCL Electrum wallet to operate on shielded transactions, the following needs to occur:

  1. Add support for the importing and saving of shielded private keys into the ZCL Electrum GUI (In Progress)
  2. Modification of the ElectrumX server to record all nullifiers and commitments on the blockchain
  3. Modification of the ZCL Electrum GUI to download and verify ALL nullifiers and commitments on the blockchain and track their confirmation status
  4. Integrate a zcashd subprocess to handle shielded note decryption/encryption and zk-snarks transaction proofs

Block Layout

The zcash team developed a python testing framework for dissecting and reassembling zcash blocks. I will be referring to the mininode.py file inside this framework.

There are two basic sections to a block:

We will omit block headers for now and skip to transactions.

Transaction Section

Shielded transactions are present inside the "JoinSplit" section of a block.

WORK ITEM

ElectrumX does not store these joinsplit transactions. Code

We must keep a record of all of these transactions and send them to the GUI when requested (similar to block headers)

In progress...

Clone this wiki locally