3340 Commits

Author SHA1 Message Date
Nicholas Ward
49504dde7d fixes 2022-12-13 10:08:36 -08:00
Nicholas Ward
20169a5476 debugging 2022-12-13 10:08:36 -08:00
Nicholas Ward
245e5faa6d fixes galore 2022-12-13 10:08:36 -08:00
Nicholas Ward
d3a7201348 fixes 2022-12-13 10:08:36 -08:00
Nicholas Ward
5759fb7b3c concat 2022-12-13 10:08:36 -08:00
Nicholas Ward
9774b74b90 Blake progress 2022-12-13 10:08:36 -08:00
Nicholas Ward
ebd606621f progress 2022-12-13 10:08:36 -08:00
Nicholas Ward
772dc5c9e7 util file 2022-12-13 10:08:36 -08:00
Nicholas Ward
df932544bd fixes and testing 2022-12-13 10:08:36 -08:00
Nicholas Ward
a38b1fb37c progress 2022-12-13 10:08:36 -08:00
Nicholas Ward
54a2e96473 progress 2022-12-13 10:08:36 -08:00
Nicholas Ward
1367f9bcca fmt 2022-12-13 10:08:36 -08:00
Nicholas Ward
dd29ec1f46 fixes and test infrastructure 2022-12-13 10:08:30 -08:00
Nicholas Ward
0cfe790210 updates 2022-12-13 10:08:16 -08:00
Nicholas Ward
5fab01b952 fix 2022-12-13 10:08:16 -08:00
Nicholas Ward
609ed6c984 fixes 2022-12-13 10:08:16 -08:00
Nicholas Ward
d3e5feba83 Blake progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
6e782a1a1e Blake progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
0c919443f9 progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
b40338ff2e progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
9a5db4b8d2 progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
a1ea7ff930 progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
1089bbf29e blake initial 2022-12-13 10:08:16 -08:00
Nicholas Ward
efa80edaa9 blake initial 2022-12-13 10:08:16 -08:00
BGluth
4645cc613c
Merge pull request #849 from mir-protocol/unused_deps_pass
Moved some deps to `[dev-dependencies]`
2022-12-13 09:53:38 -07:00
BGluth
b34b3875f7 Removed unused deps unovered by cargo-udeps
Some deps were moved to `[dev-dependencies]`.
2022-12-12 18:23:22 -07:00
Daniel Lubarov
f836e4d912
Merge pull request #848 from mir-protocol/more_cyclic_recursion_changes
A few more cyclic recursion changes
2022-12-12 08:59:13 -08:00
Daniel Lubarov
92974aa105 A few more cyclic recursion changes
In preparation for adding the zkEVM aggregation circuit. Mainly,

- Adds a `WitnessWrite` trait, a sub-trait of `Witness`, and move the write methods to it. `GeneratedValues` impls `WitnessWrite`, which lets generators like `DummyProofGenerator` access all our write methods like `set_proof_with_pis_target`. Also removes some duplication.

- Remove `set_cyclic_recursion_data_target` - now that dummy proof data is automatically populated, all that remains is populating `condition` and the cyclic proof + VK. I think it's easy enough for callers to do this; the steps are the same as with `conditionally_verify_proof`. This way there's no cyclic-recursion-specific API to learn about.

- Split `cyclic_recursion` into two variants, one which checks the current circuit or a dummy, and a more general one which checks the current circuit or some other circuit. We can use the latter to build a more efficient aggregation circuit, where we check another aggregation proof or an EVM proof, with no dummy proofs involved.
2022-12-11 22:43:26 -08:00
Jacqueline Nabaglo
b6bc018cba
Simplify JUMP/JUMPI constraints and finish witness generation (#846)
* Simplify `JUMP`/`JUMPI` constraints and finish witness generation

* Constrain stack
2022-12-11 11:08:33 -08:00
Jacqueline Nabaglo
1732239a00
Constrain memory channels in JUMPDEST (#844) 2022-12-11 11:02:19 -08:00
Jacqueline Nabaglo
249e50ebcb
Get/set context (#843) 2022-12-11 10:59:14 -08:00
Jacqueline Nabaglo
29644e5111
Implement PC instruction (#847)
* Implement `PC` instruction

* lints
2022-12-11 10:41:32 -08:00
Daniel Lubarov
64c385721f
Merge pull request #841 from mir-protocol/more_timing
More timing for zkEVM proofs
2022-12-10 23:25:19 -08:00
Daniel Lubarov
94b73e87bc backtraces 2022-12-09 21:48:36 -08:00
Daniel Lubarov
569cd058a0 log level 2022-12-09 21:48:36 -08:00
Daniel Lubarov
6f841678a5 More timing for zkEVM proofs 2022-12-09 21:48:36 -08:00
Daniel Lubarov
f58556c28d
Merge pull request #845 from mir-protocol/fix_add_eth
Fix to `add_eth`
2022-12-09 20:00:55 -08:00
Daniel Lubarov
1c78204df0 fix eth_to_wei 2022-12-09 19:57:02 -08:00
Daniel Lubarov
7557f320d4 Fix to add_eth
It was creating a new account with the hash of an empty storage trie, when really it should be a pointer to an empty storage trie. We can use 0 as this pointer since `@SEGMENT_TRIE_DATA[0] = 0 = @MPT_NODE_EMPTY`.

Also a couple tweaks that helped me debug, like moving the memory value range checks from the interpreter into `MemoryState`, so they're done in actual witness generation as well as interpreter tests.
2022-12-09 18:58:48 -08:00
Nicholas Ward
4435cedc69
Merge pull request #842 from mir-protocol/factorial
Remove confusing grammatical exclamation point from factorial example
2022-12-09 17:29:38 -08:00
Nicholas Ward
f0e144bb9b removed confusing grammatical exclamation point from factorial example 2022-12-09 17:29:09 -08:00
Jacqueline Nabaglo
95eeed46f0
Memory load/store constraints (#839) 2022-12-09 10:35:00 -08:00
Daniel Lubarov
b5a06f92fa
Merge pull request #837 from mir-protocol/fill_memory_gaps
Add dummy reads to fill any large gaps in memory fields
2022-12-09 08:56:56 -08:00
Daniel Lubarov
88f64072ef Comments 2022-12-09 08:56:49 -08:00
Daniel Lubarov
4ae1d840a9
Merge pull request #838 from mir-protocol/transfer_test
Fixes to get test_simple_transfer working
2022-12-08 23:47:58 -08:00
Daniel Lubarov
f4ab65f973 Fixes to get test_simple_transfer working 2022-12-08 23:27:20 -08:00
Daniel Lubarov
1c5590fb22 Add dummy reads to fill any large gaps in memory fields 2022-12-05 15:48:09 -08:00
Daniel Lubarov
eae94c5a6b
Merge pull request #836 from mir-protocol/evm_jemalloc
Jemalloc for EVM
2022-12-04 11:41:16 -08:00
Daniel Lubarov
fbb26546dd Jemalloc for EVM
Also update the version used elsewhere.
2022-12-04 10:15:28 -08:00
Daniel Lubarov
7d0ba54e40
Merge pull request #835 from mir-protocol/gen_fixes
Misc witness generation fixes
2022-12-03 22:58:59 -08:00