2271 Commits

Author SHA1 Message Date
Sebastien La Duca
86c1493d3d
Merge pull request #1 from mir-protocol/log-portability-stubs
Log portability stubs
2022-08-06 22:34:53 -04:00
Daniel Lubarov
385a990c50 Unsuppress warnings 2022-08-06 22:27:17 -04:00
Daniel Lubarov
1e5383c63d Stub push/pop 2022-08-06 22:18:53 -04:00
Sladuca
3d5a9174fd remove explicit feature include 2022-08-06 11:17:36 -04:00
Sebastien La Duca
8ad0924bbb apparently i need to update rust 2022-07-28 00:24:54 -04:00
Sebastien La Duca
fd0af3fa3e allow unused mut when feature disabled 2022-07-28 00:21:21 -04:00
Sebastien La Duca
9f2fa07e12 add rest of files 2022-07-28 00:09:11 -04:00
Sebastien La Duca
b7fa5e81c4 add timing to starky, evm, and system_zero 2022-07-28 00:08:51 -04:00
Sebastien La Duca
85111b0f02 fix missing underscore 2022-07-27 23:58:16 -04:00
Sebastien La Duca
a6931d4555 fmt 2022-07-27 23:53:33 -04:00
Sebastien La Duca
585495d314 feature-gate stub TimingTree 2022-07-27 23:53:26 -04:00
Sebastien La Duca
16ddfcb94c make env_logger dev-dependency 2022-07-27 23:35:15 -04:00
Jacqueline Nabaglo
c160c4032d
Inter-row program counter constraints (#639)
* Beginning of control flow support

* Fixes to halt spin loop
2022-07-27 11:36:33 -07:00
Daniel Lubarov
c028afa1f8 Update paper 2022-07-27 07:37:38 -07:00
wborgeaud
670bed946a
Merge pull request #638 from mir-protocol/interpreter_context_segments
Contexts and segments in interpreter memory
2022-07-27 10:34:41 +02:00
wborgeaud
ac68ce62c2 Merge conflicts 2022-07-27 10:16:04 +02:00
wborgeaud
fbfe0ad62a Merge branch 'main' into interpreter_context_segments 2022-07-27 10:12:59 +02:00
wborgeaud
e8ab92b115 PR feedback 2022-07-27 10:05:31 +02:00
Daniel Lubarov
a1635514b5
Merge pull request #627 from mir-protocol/rlp_3
Transaction (RLP) parsing
2022-07-26 16:25:30 -07:00
Daniel Lubarov
3d8ac2a391 style 2022-07-26 16:25:01 -07:00
Daniel Lubarov
d1cb854cf2 terminology 2022-07-26 16:12:21 -07:00
Daniel Lubarov
6df1a669e1
Merge pull request #636 from mir-protocol/challenger_fixed_buffer
Use a fixed input buffer size in `Challenger`.
2022-07-26 16:09:19 -07:00
Daniel Lubarov
0ba6078984 Merge branch 'main' into rlp_3 2022-07-25 19:47:43 -07:00
Daniel Lubarov
05c7dfa115 Feedback 2022-07-25 16:32:59 -07:00
wborgeaud
a0295f0079 Minor 2022-07-25 11:09:41 +02:00
wborgeaud
304299a007 Add assert to range check memory values 2022-07-25 10:39:51 +02:00
wborgeaud
715c350ee8 Implement mload/store_general 2022-07-25 10:34:18 +02:00
wborgeaud
e09e6c3ebb
Merge pull request #634 from mir-protocol/fix_fixed_base_constant
Fix bug where `constant_affine_point` is called on zero
2022-07-25 10:33:34 +02:00
Daniel Lubarov
2aad4658d2
Merge pull request #637 from mir-protocol/move_storage
Move storage asm
2022-07-24 14:03:01 -07:00
Daniel Lubarov
1db5b7374d Move storage asm 2022-07-24 08:42:06 -07:00
Daniel Lubarov
cddc749a7e Fix comparison 2022-07-24 08:06:02 -07:00
Daniel Lubarov
0e5dd59d35 Use a fixed input buffer size in Challenger.
Alternate implementation of #633, using `SPONGE_RATE` as the buffer size.
2022-07-23 22:29:45 -07:00
Daniel Lubarov
544c84b420 Transaction (RLP) parsing
Will add tests once we have the interpreter support for other segmnets.
2022-07-23 21:39:01 -07:00
wborgeaud
ee979428f4 Start implementing context and segments in interpreter 2022-07-23 15:35:48 +02:00
wborgeaud
bbc2ff27ab Fix minor bug where constant_affine_point is called on zero 2022-07-23 09:18:41 +02:00
Daniel Lubarov
60227b9828
Merge pull request #626 from mir-protocol/asm_fixes
A few ASM fixes
2022-07-20 15:28:01 -07:00
Daniel Lubarov
47ea00d6c7 A few ASM fixes 2022-07-20 15:05:09 -07:00
Daniel Lubarov
90f7e8a181
Merge pull request #623 from mir-protocol/prover_input_instruction
`PROVER_INPUT` instruction
2022-07-20 11:47:34 -07:00
Daniel Lubarov
63a86a36f5 Merge branch 'main' into prover_input_instruction 2022-07-20 11:46:18 -07:00
Daniel Lubarov
676e833215
Merge pull request #625 from mir-protocol/stack_manipulation
Stack manipulation macro
2022-07-20 09:47:53 -07:00
Daniel Lubarov
c7ba4eb6ee Feedback 2022-07-20 09:45:05 -07:00
Daniel Lubarov
78fb34a9b6 Minor 2022-07-20 00:10:52 -07:00
Daniel Lubarov
1a0d6f4413 Pruning 2022-07-19 23:43:29 -07:00
Daniel Lubarov
05a1fbfbae Stack manipulation macro
Uses a variant of Dijkstra's, with a few pruning mechanics, to find a path of instructions between the two stack states. We don't explicitly store the graph though.

The Dijkstra implementation is somewhat inspired by the `pathfinding` crate. That crate doesn't quite fit our needs though.

If we need to make it faster later, there are a lot of allocations and clones that we could probably eliminate.
2022-07-19 22:59:56 -07:00
Daniel Lubarov
e3f7cc21c1
Merge pull request #624 from mir-protocol/mload_kernel_code_u32
Add a `mload_kernel_code_u32` macro
2022-07-19 12:18:15 -07:00
Daniel Lubarov
3dc79274a8 Add a mload_kernel_code_u32 macro
Intended for loading constants in SHA2, and maybe RIPEMD.

Sample usage
```
// Loads the i'th K256 constant.
%macro k256
  // stack: i
  %mul_const(4)
  // stack: 4*i
  PUSH k256_data
  // stack: k256_data, 4*i
  ADD
  // stack: k256_data + 4*i
  %mload_kernel_code_u32
  // stack: K256[4*i]
%endmacro

k256_data:
    BYTES 0x42, 0x8a, 0x2f, 0x98
    BYTES 0x71, 0x37, 0x44, 0x91
    ...
```

Untested for now since our interpreter doesn't have the needed memory support quite yet.
2022-07-19 10:36:18 -07:00
Daniel Lubarov
71db231c59
Merge pull request #622 from mir-protocol/memcpy
Implement memcpy
2022-07-19 07:21:15 -07:00
Daniel Lubarov
5b1f564039 Feedback 2022-07-19 07:20:57 -07:00
wborgeaud
1a5134e4b9
Merge pull request #620 from mir-protocol/sha3_interpreter_ecrecover
Implement SHA3 in interpreter and use it in ecrecover
2022-07-19 16:04:25 +02:00
Daniel Lubarov
b9b3c24cf9 PROVER_INPUT instruction 2022-07-19 06:55:23 -07:00