Skip to content

Commit 97f012c

Browse files
committed
Remove deprecated example
1 parent d85a216 commit 97f012c

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

book/src/customexample.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
11

2-
# Ethdos custom predicate, using binary AND and OR: example of a direct definition and a recursive group
3-
4-
## Direct definition
5-
(DEPRECATED: All predicates must be defined as part of a group.)
6-
```
7-
eth_friend(src_or, src_key, dst_or, dst_key) = and<
8-
// there is an attestation pod that's a SIGNATURE POD
9-
ValueOf(attestation_pod, "type", SIGNATURE)
10-
11-
// the attestation pod is signed by (src_or, src_key)
12-
Equal((attestation_pod, "signer"), (src_or, src_key))
13-
14-
// that same attestation pod has an "attestation"
15-
Equal((attestation_pod, "attestation"), (dst_or, dst_key))
16-
>
17-
18-
On the backend, this is converted to a rule where all the arguments are either wildcards or literals:
19-
eth_friend(*1, *2, *3, *4) = and<
20-
// there is an attestation pod that's a SIGNATURE POD
21-
ValueOf(*5, "type", SIGNATURE)
22-
23-
// the attestation pod is signed by (src_or, src_key)
24-
Equal((*5, "signer"), (*1, *2))
25-
26-
// that same attestation pod has an "attestation"
27-
Equal((*5, "attestation"), (*3, *4))
28-
>
29-
30-
This backend definition is then hashed in the obvious way.
31-
32-
```
33-
34-
## Recursive group definition
2+
# Ethdos custom predicate, using binary AND and OR: example of a recursive group
353

364
```
375
eth_dos_distance(src_or, src_key, dst_or, dst_key, distance_or, distance_key) = or<

0 commit comments

Comments
 (0)