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
* avoid recomputing proof indices
* add pivot feature to builder
* remove progress bar and add features to support different chains
* update with simplfied api
* add faster strat for multiproof builder
Copy file name to clipboardExpand all lines: README.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,15 @@ cargo risczero --version
107
107
108
108
This repo uses [just](https://github.com/casey/just) as a command runner. Installation instructions [here](https://github.com/casey/just?tab=readme-ov-file#installation)
109
109
110
-
It also uses git-lfs to manage cached inputs. Ensure this is installed.
110
+
## Running tests
111
+
112
+
Use
113
+
114
+
```shell
115
+
just test
116
+
```
117
+
118
+
Attempting to run tests with `cargo test` will fail unless they can generate proofs locally.
111
119
112
120
## Usage
113
121
@@ -142,62 +150,55 @@ See the [deployment guide](./docs/deployment-guide.md) for instructions on deplo
142
150
143
151
### Simple Usage via CLI
144
152
145
-
Using the justfile scripts provides a simple way to get started and examples of using the CLI. These will write intermediate files into the current directory.
153
+
Using the justfile scripts provides a simple way to get started and examples of using the CLI. These will write intermediate proof files into the current directory.
146
154
These are mostly included for example usage of the CLI. For a production deployment use the CLI directly as required.
147
155
148
156
#### Initial membership proof
149
157
150
-
The repo comes with the mainnet inputs built for slot 11494239.
151
-
152
158
To create a proof run
153
159
154
160
```shell
155
-
just prove_membership_init 11494239
161
+
just prove_membership_init <slot>
156
162
```
157
163
158
164
#### Updating a membership proof
159
165
160
-
Update an existing membership proof to a newer beacon chain slot, e.g. to slot 11495000, you will need to build the inputs and then build a proof. Run
166
+
Update an existing membership proof to a newer beacon chain slot you will need to build the inputs and then build a proof. Run
161
167
162
168
```shell
163
-
just build_input_continuation 11494239 11495000
164
-
just prove_membership_continuation 11494239 11495000
169
+
just prove_membership_continuation <slot><new_slot>
165
170
```
166
171
167
-
This will write a new proof that composes the old one and proves the membership of all validators up to slot 11495000. There is no need to update membership proofs but it is a good way to save proving cycles.
172
+
This will write a new proof that composes the old one and proves the membership of all validators up to slot `new_slot`. There is no need to update membership proofs but it is a good way to save proving cycles.
168
173
169
174
#### Building an aggregate oracle proof
170
175
171
176
To build a proof at this new slot ready to submit on-chain run:
172
177
173
178
```shell
174
-
just build_input_aggregation 11495000
175
-
just prove_aggregate 11495000
179
+
just prove_aggregate <slot>
176
180
```
177
181
178
-
This requires that a membership proof (either initial or continuation) for slot 1100 has already been created. It will write to file a proof and report ready to submit on-chain
182
+
This requires that a membership proof (either initial or continuation) for `slot` has already been created. It will write to file a proof and report ready to submit on-chain
179
183
180
-
> [!NOTE]
181
-
> For slots containing many Lido validators this will take a long time to build the SSZ proof input locally (hours) and to generate the proof (minutes on Bonsai)
182
184
183
185
Submit on-chain with:
184
186
185
187
```shell
186
-
just submit 11495000
188
+
just submit <slot>
187
189
```
188
190
189
191
#### More advanced usage
190
192
191
193
Using the CLI directly provides more flexibility. See the help and subcommands help
192
194
193
195
```
194
-
> cargo run --help
196
+
> cargo run -- --help
195
197
CLI for generating and submitting Lido oracle proofs
196
198
197
199
Usage: cli [OPTIONS] --slot <SLOT> <COMMAND>
198
200
199
201
Commands:
200
-
build Build an input for a proof
201
202
prove Generate a proof from a given input
202
203
submit Submit an aggregation proof to the oracle contract
203
204
help Print this message or the help of the given subcommand(s)
0 commit comments