@@ -276,14 +276,42 @@ Here's the breakdown of who holds each piece of data described above:
276276 2 . His account: its index in the sequence and all the fields ($i, b, t$).
277277 3 . The contents of all the notes that were sent to him by other users.
278278
279+ ### zkSNARK Constraint system
279280
280- ### Steps to Create a Transaction
281+ In order to check that transactions proposed by users are valid, and avoid
282+ disclosing the transaction details (accounts invonved, amounts of tokens
283+ transferred) we use zkSNARKs. In this section, we define the zkSNARK constraint
284+ system used.
285+
286+ Public inputs:
287+
288+ 1 . ` old_root ` , the current Merkle tree root that serves at the commitment of
289+ the accounts and notes sequence state before the transaction.
290+ 2 . ` new_root ` , the proposed root of the Merkle tree after the transaction.
291+ 3 . ` nullifier ` , the nullifier of transaction's input account (the one that's
292+ being "spent" or consumed by the transaction).
293+ 4 . ` delta ` , the difference between the amount of tokens the transaction
294+ produces and the amount it consumes (` delta ` being a nonzero value means
295+ that this transaction either involves a deposit into ZeroPool from an
296+ account on the underlying blockchain or a withdrawal).
297+
298+ Secret inputs:
299+
300+ 1 . User's verifying $A$ and intermediate $\eta$ keys.
301+ 2 . The values of input account and notes.
302+ 3 . Merkle proofs pointing at the hashes of input accounts and notes in the
303+ sequence bound by ` old_root ` committment.
304+ 4 . The values of the output account and notes.
305+ 5 . Index of the left-most zero leaf in the Merkle tree (the position from which
306+ the output account and notes will be written to the sequence).
307+ 6 . The signature of all the above produced using user's spending key $\sigma$.
281308
282- The public inputs of CSes are:
309+ Conditions checked:
310+
311+ 1 . …
312+
313+ ### Steps to Create a Transaction
283314
284- - root
285- - nullifier
286- - out_commit
287- - delta
288315
289316### Steps to Verify a Transaction
317+
0 commit comments