Skip to content

Commit 0f0249e

Browse files
committed
Update docs: Remove low-level Merkle tree statements
1 parent c6bd4d6 commit 0f0249e

File tree

3 files changed

+33
-38
lines changed

3 files changed

+33
-38
lines changed

book/src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
- [Signature](./signature.md)
1414
- [Deductions](./deductions.md)
1515
- [Statements](./statements.md)
16-
- [Statements involving compound types and Merkle trees](./merklestatements.md)
1716
- [Operations](./operations.md)
1817
- [Simple example](./simpleexample.md)
1918
- [Custom statements and custom operations](./custom.md)

book/src/merklestatements.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# Copied from statements.md
2+
3+
```
4+
Branches(parent: AnchoredKey::MerkleTree, left: AnchoredKey::MerkleTree, right: AnchoredKey::MerkleTree)
5+
6+
Leaf(node: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
7+
8+
IsNullTree(node: AnchoredKey::MerkleTree)
9+
10+
GoesLeft(key: AnchoredKey, depth: Value::Integer)
11+
12+
GoesRight(key: AnchoredKey, depth: Value::Integer)
13+
14+
Contains(root: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
15+
16+
MerkleSubtree(root: AnchoredKey::MerkleTree, node: AnchoredKey::MerkleTree)
17+
18+
MerkleCorrectPath(root: AnchoredKey::MerkleTree, node: AnchoredKey::MerkleTree, key: AnchoredKey, depth: Value::Integer)
19+
20+
Contains(root: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
21+
22+
NotContains(root: AnchoredKey::MerkleTree, key: AnchoredKey)
23+
24+
ContainsHashedKey(root: AnchoredKey::DictOrSet, key: AnchoredKey)
25+
26+
NotContainsHashedKey(root: AnchoredKey::DictOrSet, key: AnchoredKey)
27+
28+
ContainsValue(root: AnchoredKey::Array, value: AnchoredKey)
29+
```
30+
131
# Statements involving compound types and Merkle trees
232

333
The front end has three compound types

book/src/statements.md

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -53,42 +53,12 @@ The frontend also exposes the following syntactic sugar predicates. These predi
5353
| 1006 | Gt | `Gt(a, b) -> Lt(b, a)` |
5454

5555

56-
57-
The following statements relate to Merkle trees and compound types; they are explained in detail on a [separate page](./merklestatements.md).
58-
59-
```
60-
Branches(parent: AnchoredKey::MerkleTree, left: AnchoredKey::MerkleTree, right: AnchoredKey::MerkleTree)
61-
62-
Leaf(node: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
63-
64-
IsNullTree(node: AnchoredKey::MerkleTree)
65-
66-
GoesLeft(key: AnchoredKey, depth: Value::Integer)
67-
68-
GoesRight(key: AnchoredKey, depth: Value::Integer)
69-
70-
Contains(root: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
71-
72-
MerkleSubtree(root: AnchoredKey::MerkleTree, node: AnchoredKey::MerkleTree)
73-
74-
MerkleCorrectPath(root: AnchoredKey::MerkleTree, node: AnchoredKey::MerkleTree, key: AnchoredKey, depth: Value::Integer)
75-
76-
Contains(root: AnchoredKey::MerkleTree, key: AnchoredKey, value: AnchoredKey)
77-
78-
NotContains(root: AnchoredKey::MerkleTree, key: AnchoredKey)
79-
80-
ContainsHashedKey(root: AnchoredKey::DictOrSet, key: AnchoredKey)
81-
82-
NotContainsHashedKey(root: AnchoredKey::DictOrSet, key: AnchoredKey)
83-
84-
ContainsValue(root: AnchoredKey::Array, value: AnchoredKey)
85-
```
86-
87-
8856
In the future, we may also reserve statement IDs for "precompiles" such as:
8957
```
90-
EcdsaPrivToPubOf(A.pubkey, B.privkey)
58+
EcdsaPrivToPubOf(A.pubkey, B.privkey),
9159
```
60+
as well as for low-level operations on Merkle trees and compound types.
61+
<font color="red">NOTE</font> Merkle trees and compound types explained in a seperate markdown file `./merklestatements.md` which is no longer part of these docs, but saved in the github repo in case we need to restore it in the future.
9262

9363
### Built-in statements for entries of any type
9464

@@ -130,10 +100,6 @@ poseidon_hash_of(A.hash, B.preimage) // perhaps a hash_of predicate can be param
130100
ecdsa_priv_to_pub_of(A.pubkey, B.privkey)
131101
```
132102

133-
##### Primitive Built-in Statements for Merkle Roots
134-
135-
[See separate page](./merklestatements.md).
136-
137103

138104

139105
[^builtin]: <font color="red">TODO</font> List of built-in statements is not yet complete.

0 commit comments

Comments
 (0)