Skip to content

Commit 6072160

Browse files
committed
update
1 parent d81a945 commit 6072160

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

docs/new-docs/03-transaction.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ and notes can not be used again.
1717

1818
Since the consumed and newly created account have the same associated
1919
key $\sigma$ and belong to the same user, one can also view them as two
20-
instantiations of the same account, and transaction as modifying this account
21-
(overwriting some fields in it).
20+
instantiations of the same account, and transaction as modifying this account:
21+
creating a copy with some fields modified, invalidating the old version and
22+
marking the new one as current.
2223

2324
:::
2425

@@ -256,21 +257,33 @@ leaf $n$ with value $H(s_{n})$.
256257
Using Merkle Tree commitment to implement a sequence of accounts and notes in
257258
ZeroPool means that the total length of the sequence can never exceed $2^h$.
258259

259-
## zkSNARK Constraint Systems
260+
## Putting Everything Together
260261

261-
**TODO: Where to introduce nullifiers?**
262+
Here's the breakdown of who holds each piece of data described above:
262263

263-
The global state maintained by the ZeroPool smart-contract is given by the root
264-
hash of Merkle Tree containing accounts and notes sequence. The smart-contract
265-
allows anyone to replace the root it stores with a new value only if the
266-
sequence commited to by the new root is obtained from the old one by applying a
267-
valid transaction to it.
264+
- The ZeroPool smart-contract knows:
268265

269-
TODO: Introduce zkSNARK CSes.
266+
1. The `root` of the Merkle tree that commits to the current sequence of
267+
accounts and notes.
268+
2. The set of nullifiers published by transactions so far.
269+
270+
Since the operations performed by the smart-contract are public as well as
271+
the data they operate on, these values are also visible to all users.
272+
273+
- Each ZeroPool user knows:
274+
275+
1. His spending $\sigma$, verifying $A$, intermediate $\eta$ keys.
276+
2. His account: its index in the sequence and all the fields ($i, b, t$).
277+
3. The contents of all the notes that were sent to him by other users.
278+
279+
280+
### Steps to Create a Transaction
270281

271282
The public inputs of CSes are:
272283

273284
- root
274285
- nullifier
275286
- out_commit
276287
- delta
288+
289+
### Steps to Verify a Transaction

0 commit comments

Comments
 (0)