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
feat: add historical library tests and remove old inclusion proof contract / related tests (#12215)
Adding txe tests to the historical apis, and removing inclusion proofs
contract with corresponding (flaky) e2e test
---------
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
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, we fetch notes located in the storage slot that we pass in from the function parameters. The notes also must match the criteria specified by the getter options that we declare and are able to customize.
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