Skip to content

Commit 8ab09c9

Browse files
committed
docs
1 parent 7660ce0 commit 8ab09c9

File tree

4 files changed

+233
-0
lines changed

4 files changed

+233
-0
lines changed

doc/polycli_ulxly.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ The command also inherits flags from parent commands.
4646

4747
- [polycli ulxly claim-everything](polycli_ulxly_claim-everything.md) - Attempt to claim as many deposits and messages as possible
4848

49+
- [polycli ulxly compute-balance-nullifier-tree](polycli_ulxly_compute-balance-nullifier-tree.md) - Compute the balance tree and the nullifier tree given the deposits and claims
50+
51+
- [polycli ulxly compute-balance-tree](polycli_ulxly_compute-balance-tree.md) - Compute the balance tree given the deposits
52+
53+
- [polycli ulxly compute-nullifier-tree](polycli_ulxly_compute-nullifier-tree.md) - Compute the nullifier tree given the claims
54+
4955
- [polycli ulxly empty-proof](polycli_ulxly_empty-proof.md) - create an empty proof
5056

5157
- [polycli ulxly get-claims](polycli_ulxly_get-claims.md) - Generate ndjson for each bridge claim over a particular range of blocks
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# `polycli ulxly compute-balance-nullifier-tree`
2+
3+
> Auto-generated documentation.
4+
5+
## Table of Contents
6+
7+
- [Description](#description)
8+
- [Usage](#usage)
9+
- [Flags](#flags)
10+
- [See Also](#see-also)
11+
12+
## Description
13+
14+
Compute the balance tree and the nullifier tree given the deposits and claims
15+
16+
```bash
17+
polycli ulxly compute-balance-nullifier-tree [flags]
18+
```
19+
20+
## Usage
21+
22+
This command will attempt to compute the root of the balnace tree based on the bridge
23+
events that are provided.
24+
25+
Example usage:
26+
27+
```bash
28+
polycli ulxly compute-balance-nullifier-tree \
29+
--l2-claim-file l2-claim-0-to-11454081.ndjson \
30+
--l2-deposits-file l2-deposits-0-to-11454081.ndjson \
31+
--l2-network-id 3
32+
--bridge-address 0x528e26b25a34a4A5d0dbDa1d57D318153d2ED582 \
33+
--rpc-url http://localhost:8213 | jq '.'
34+
```
35+
36+
In this case we are assuming we have two files
37+
`l2-claim-0-to-11454081.ndjson` and `l2-deposits-0-to-11454081.ndjson` that would have been generated
38+
with a call to `polycli ulxly get-deposits` and `polycli ulxly get-claims` pointing to each network.
39+
The output will be the roots of the trees for the provided deposits and claims.
40+
41+
This is the response from polycli:
42+
43+
```json
44+
{
45+
"balanceTreeRoot": "0x089ed8cce8639374a1bbd2480df7ed5224ea715b7521e1e2de549a6def791757",
46+
"nullifierTreeRoot": "0x7f075c4345694cc79a573890d7ec6222534cf470355611801104be0c8bf972c4",
47+
"initPessimisticRoot": "0x4358f03557f5d34ab419bee9919b4858c9d9bdedbe8e7ce7fb78ff9c4bc65676"
48+
}
49+
```
50+
51+
Note: more info https://github.com/BrianSeong99/Agglayer_PessimisticProof_Benchmark?tab=readme-ov-file#architecture-of-pessimistic-proof
52+
## Flags
53+
54+
```bash
55+
--bridge-address string Bridge Address
56+
-h, --help help for compute-balance-nullifier-tree
57+
--l2-claims-file string An ndjson file with l2 claim events data
58+
--l2-deposits-file string An ndjson file with l2 deposit events data
59+
--l2-network-id uint32 The L2 networkID
60+
-r, --rpc-url string RPC URL
61+
```
62+
63+
The command also inherits flags from parent commands.
64+
65+
```bash
66+
--config string config file (default is $HOME/.polygon-cli.yaml)
67+
--pretty-logs Should logs be in pretty format or JSON (default true)
68+
-v, --verbosity int 0 - Silent
69+
100 Panic
70+
200 Fatal
71+
300 Error
72+
400 Warning
73+
500 Info
74+
600 Debug
75+
700 Trace (default 500)
76+
```
77+
78+
## See also
79+
80+
- [polycli ulxly](polycli_ulxly.md) - Utilities for interacting with the uLxLy bridge
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# `polycli ulxly compute-balance-tree`
2+
3+
> Auto-generated documentation.
4+
5+
## Table of Contents
6+
7+
- [Description](#description)
8+
- [Usage](#usage)
9+
- [Flags](#flags)
10+
- [See Also](#see-also)
11+
12+
## Description
13+
14+
Compute the balance tree given the deposits
15+
16+
```bash
17+
polycli ulxly compute-balance-tree [flags]
18+
```
19+
20+
## Usage
21+
22+
This command will attempt to compute the root of the balnace tree based on the bridge
23+
events that are provided.
24+
25+
Example usage:
26+
27+
```bash
28+
polycli ulxly compute-balance-tree \
29+
--l2-claims-file l2-claims-0-to-11454081.ndjson \
30+
--l2-deposits-file l2-deposits-0-to-11454081.ndjson \
31+
--l2-network-id 3
32+
--bridge-address 0x528e26b25a34a4A5d0dbDa1d57D318153d2ED582 \
33+
--rpc-url http://localhost:8213 | jq '.'
34+
```
35+
36+
In this case we are assuming we have two files
37+
`l2-claims-0-to-11454081.ndjson` and `l2-deposits-0-to-11454081.ndjson` that would have been generated
38+
with a call to `polycli ulxly get-deposits` and `polycli ulxly get-claims` pointing to each network. The output will be the
39+
root of the tree for the provided deposits and claims.
40+
41+
This is the response from polycli:
42+
43+
```json
44+
{
45+
"root": "0x4516ca2a793b8e20f56ec6ba8ca6033a672330670a3772f76f2ade9bc2125150"",
46+
}
47+
```
48+
49+
Note: more info https://github.com/BrianSeong99/Agglayer_PessimisticProof_Benchmark?tab=readme-ov-file#architecture-of-pessimistic-proof
50+
## Flags
51+
52+
```bash
53+
--bridge-address string Bridge Address
54+
-h, --help help for compute-balance-tree
55+
--l2-claims-file string An ndjson file with l2 claim events data
56+
--l2-deposits-file string An ndjson file with l2 deposit events data
57+
--l2-network-id uint32 The L2 networkID
58+
-r, --rpc-url string RPC URL
59+
```
60+
61+
The command also inherits flags from parent commands.
62+
63+
```bash
64+
--config string config file (default is $HOME/.polygon-cli.yaml)
65+
--pretty-logs Should logs be in pretty format or JSON (default true)
66+
-v, --verbosity int 0 - Silent
67+
100 Panic
68+
200 Fatal
69+
300 Error
70+
400 Warning
71+
500 Info
72+
600 Debug
73+
700 Trace (default 500)
74+
```
75+
76+
## See also
77+
78+
- [polycli ulxly](polycli_ulxly.md) - Utilities for interacting with the uLxLy bridge
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# `polycli ulxly compute-nullifier-tree`
2+
3+
> Auto-generated documentation.
4+
5+
## Table of Contents
6+
7+
- [Description](#description)
8+
- [Usage](#usage)
9+
- [Flags](#flags)
10+
- [See Also](#see-also)
11+
12+
## Description
13+
14+
Compute the nullifier tree given the claims
15+
16+
```bash
17+
polycli ulxly compute-nullifier-tree [flags]
18+
```
19+
20+
## Usage
21+
22+
This command will attempt to computethe nullifierTree based on the claims that are provided.
23+
24+
Example usage:
25+
26+
```bash
27+
polycli ulxly compute-nullifier-tree \
28+
--file-name claims-cardona-4880876-to-6028159.ndjson | jq '.'
29+
```
30+
31+
In this case we are assuming we have a file
32+
`claims-cardona-4880876-to-6028159.ndjson` that would have been generated
33+
with a call to `polycli ulxly get-claims`. The output will be the
34+
claims necessary to compute the nullifier tree.
35+
36+
This is the response from polycli:
37+
38+
```json
39+
{
40+
"root": "0x4516ca2a793b8e20f56ec6ba8ca6033a672330670a3772f76f2ade9bc2125150"",
41+
}
42+
```
43+
44+
Note: more info https://github.com/BrianSeong99/Agglayer_PessimisticProof_Benchmark?tab=readme-ov-file#architecture-of-pessimistic-proof
45+
## Flags
46+
47+
```bash
48+
--file-name string An ndjson file with events data
49+
-h, --help help for compute-nullifier-tree
50+
```
51+
52+
The command also inherits flags from parent commands.
53+
54+
```bash
55+
--config string config file (default is $HOME/.polygon-cli.yaml)
56+
--pretty-logs Should logs be in pretty format or JSON (default true)
57+
-v, --verbosity int 0 - Silent
58+
100 Panic
59+
200 Fatal
60+
300 Error
61+
400 Warning
62+
500 Info
63+
600 Debug
64+
700 Trace (default 500)
65+
```
66+
67+
## See also
68+
69+
- [polycli ulxly](polycli_ulxly.md) - Utilities for interacting with the uLxLy bridge

0 commit comments

Comments
 (0)