You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/docs/developers/guides/smart_contracts/writing_contracts/how_to_prove_history.md
+8-10
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 4
4
4
tags: [contracts]
5
5
---
6
6
7
-
The Aztec Protocol uses an append-only Merkle tree to store hashes of the headers of all previous blocks in the chain as its leaves. This is known as the Archive tree.
7
+
The Aztec Protocol uses an append-only Merkle tree to store hashes of the headers of all previous blocks in the chain as its leaves. This is known as the Archive tree.
8
8
9
9
This page is a quick introductory guide to creating historical proofs proofs from the archive tree.
10
10
@@ -37,33 +37,31 @@ Using this library, you can check that specific notes or nullifiers were part of
37
37
38
38
In general you will likely have the note you want to prove inclusion of. But if you are just experimenting you can create a note with a function like below:
In this example, the user's notes are stored in a map called `private_values`. We retrieve this map, then select 1 note from it with the value of `1`.
48
+
In this example, the user's notes are stored in a storage_slot that is specified. We look for notes located in this storage_slot and return the ones matched by the getter options.
49
49
50
50
## Prove that a note was included in a specified block
51
51
52
52
To prove that a note existed in a specified block, call `prove_note_inclusion` on the `header` as shown in this example:
This will only prove the note existed at the specific block number, not whether or not the note has been nullified. You can prove that a note existed and had not been nullified in a specified block by using `prove_note_validity` on the block header which takes the following arguments:
0 commit comments