Commit ca608d4
committed
refactor: make proving-capability correct for proving
closes #576
TxProvingCapability was being used by ProofBuilder and by ProvingJob but its
variants were logically incorrect for these usages because these types only care
about NeptuneProof, not about TransactionProof variants, which
TxProvingCapability mirrored.
This commit fixes that by renaming enum TxProvingCapability to struct
VmProvingCapability which is a newtype for log2(padded_height).
Some impl<From> are added to TransactionProofType that make it easy to convert
to a VmProvingCapability and vice-versa.
capability detection is moved from cli_args::Args into
VmProvingCapability::auto_detect(). Proof-collection is now log2-padded-height
of 15, rather than 11. This is because some tests were failing and required 15
so it is experimentally determined.
changes --tx-proving-capability to --vm-proving-capability <int>.
removes --max_log2_padded_height_for_proofs as --vm-proving-capability has the
same meaning.
removes fields proof_type and max_log2_padded_height from ProverJobSettings, as
they are no longer relevant. proof_type makes no sense there and
max_log2_padded_height is present inside vm_proving_capability.
adds method transaction_proof_type() to TransactionProofBuilder, where it
actually does make sense.
updates tests, adds docs and examples.
Squashed:
+ removed proof_type and max_log2_padded_height from ProverJobSettings.
Added transaction_proof_type to TransactionProofBuilder.
+ re-implemented TxProvingCapability as struct, not enum.
+ rename TxProvingCapability VmProvingCapability
+ default tx_proof_type to best proof capable of. other misc
+ move capability auto-detection from Args into VmProvingCapability
+ ProofCollection now 15 instead of 111 parent 0450a47 commit ca608d4
File tree
34 files changed
+731
-640
lines changed- scripts/php
- src
- api
- tx_initiation
- builder
- bin/dashboard_src
- config_models
- main_loop
- models
- blockchain
- block
- validity
- transaction
- proof_abstractions/tasm
- state
- wallet
- tests
- tests
- common
34 files changed
+731
-640
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
88 | | - | |
89 | 82 | | |
90 | 83 | | |
91 | 84 | | |
| |||
127 | 120 | | |
128 | 121 | | |
129 | 122 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 123 | | |
137 | 124 | | |
138 | 125 | | |
| 126 | + | |
139 | 127 | | |
140 | | - | |
| 128 | + | |
141 | 129 | | |
142 | 130 | | |
143 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
211 | 204 | | |
212 | 205 | | |
213 | 206 | | |
| |||
Lines changed: 47 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
164 | 173 | | |
165 | 174 | | |
166 | 175 | | |
| |||
241 | 250 | | |
242 | 251 | | |
243 | 252 | | |
| 253 | + | |
244 | 254 | | |
245 | 255 | | |
246 | 256 | | |
| 257 | + | |
| 258 | + | |
247 | 259 | | |
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
251 | 263 | | |
252 | 264 | | |
253 | | - | |
| 265 | + | |
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
| |||
284 | 296 | | |
285 | 297 | | |
286 | 298 | | |
287 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
288 | 307 | | |
289 | 308 | | |
290 | 309 | | |
291 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
292 | 318 | | |
293 | 319 | | |
294 | 320 | | |
295 | 321 | | |
296 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
297 | 330 | | |
298 | 331 | | |
299 | 332 | | |
| |||
333 | 366 | | |
334 | 367 | | |
335 | 368 | | |
| 369 | + | |
336 | 370 | | |
337 | 371 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 372 | | |
342 | 373 | | |
343 | | - | |
| 374 | + | |
344 | 375 | | |
345 | 376 | | |
346 | 377 | | |
| |||
356 | 387 | | |
357 | 388 | | |
358 | 389 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
366 | 397 | | |
367 | 398 | | |
368 | | - | |
| 399 | + | |
369 | 400 | | |
370 | 401 | | |
371 | 402 | | |
| |||
0 commit comments