2112 Commits

Author SHA1 Message Date
wborgeaud
50ebf39d37 Comment 2022-07-11 14:24:12 +02:00
wborgeaud
3ff67e38dc Minor 2022-07-11 14:16:58 +02:00
wborgeaud
36c8aa34c1 Comments 2022-07-11 14:13:07 +02:00
wborgeaud
91fcf26289 Better CTL error 2022-07-11 11:07:16 +02:00
wborgeaud
457ac11083
Merge pull request #596 from mir-protocol/evm_interpreter
EVM interpreter
2022-07-08 03:21:54 -05:00
wborgeaud
12ca084620 PR feedback 2022-07-08 09:58:52 +02:00
wborgeaud
bd5c9aa889
Merge pull request #597 from mir-protocol/ec_use_macro_params
Use macros with parameters in EC ops kernel functions
2022-07-07 13:40:23 -05:00
wborgeaud
a280e1c60a Merge branch 'ec_use_macro_params' into evm_interpreter 2022-07-07 19:28:22 +02:00
wborgeaud
a3c2e9a295 More macros 2022-07-07 19:28:11 +02:00
wborgeaud
122188c817 Merge branch 'ec_use_macro_params' into evm_interpreter 2022-07-07 19:17:31 +02:00
wborgeaud
4316be96cd Test exp kernel function 2022-07-07 19:15:39 +02:00
wborgeaud
7bf5118f69 Test exp kernel function 2022-07-07 18:46:20 +02:00
wborgeaud
78eb7843de Merge remote-tracking branch 'origin/evm_interpreter' into evm_interpreter 2022-07-07 18:27:28 +02:00
wborgeaud
f8987b7e80 Minor 2022-07-07 18:27:15 +02:00
wborgeaud
267f4162dd Minor 2022-07-07 18:20:24 +02:00
wborgeaud
9c4947e0f0 EC ops test 2022-07-07 18:06:24 +02:00
Daniel Lubarov
beb8a90773
Macros with arguments (#595)
* Macros with arguments

See `basic_macros.rs` for an example.

* rename
2022-07-07 08:59:53 -07:00
wborgeaud
3ec2d307e5 EVM interpreter 2022-07-07 16:53:06 +02:00
wborgeaud
b90be5164f
Merge pull request #594 from mir-protocol/elliptic_curve_asm
Elliptic curve assembly
2022-07-07 08:00:47 -05:00
wborgeaud
434615a03c PR feedback + comments 2022-07-07 08:26:57 +02:00
wborgeaud
e2b1e51280 Minor 2022-07-06 09:40:11 +02:00
wborgeaud
9747343ac2 PR feedback 2022-07-06 09:25:41 +02:00
wborgeaud
5bae732ea0 Minor 2022-07-05 21:24:51 +02:00
wborgeaud
8ffd25c127 Add zero case for mul 2022-07-05 21:22:05 +02:00
wborgeaud
fb8a67b0d9 Working ecmul 2022-07-05 21:12:11 +02:00
wborgeaud
006b74f4dc Merge branch 'main' into elliptic_curve_asm 2022-07-05 20:29:21 +02:00
wborgeaud
9e90d7d115 Add check for zero point 2022-07-05 20:27:55 +02:00
wborgeaud
726bcd4575
Merge pull request #593 from mir-protocol/labels_before_assemble
Find global labels before assembly
2022-07-05 11:22:25 -05:00
wborgeaud
fd1d9fe85e Add range check 2022-07-05 17:37:34 +02:00
wborgeaud
8e711d413a Minor 2022-07-05 16:41:28 +02:00
wborgeaud
ee80fa4a39 Minor 2022-07-05 16:19:23 +02:00
wborgeaud
8873eaba11 Find labels before assembly 2022-07-05 16:11:55 +02:00
wborgeaud
7364248e60 Fixes 2022-07-05 15:43:41 +02:00
wborgeaud
eed7cde388 Add moddiv for testing 2022-07-05 15:01:40 +02:00
wborgeaud
8a44c557c5 Curve mul assembly 2022-07-05 12:11:35 +02:00
wborgeaud
4d37685744 Comment 2022-07-05 11:12:56 +02:00
wborgeaud
a5988d6c26 Simplify 2022-07-05 11:09:25 +02:00
wborgeaud
4cdbb8c1a9 Minor 2022-07-05 10:47:29 +02:00
wborgeaud
6db8539bc8 Minor 2022-07-05 10:46:07 +02:00
wborgeaud
683efc0d74 Impl double 2022-07-05 10:45:26 +02:00
wborgeaud
92bb8d5fa9 Merge branch 'main' into elliptic_curve_asm
# Conflicts:
#	evm/src/cpu/kernel/ast.rs
2022-07-05 09:03:19 +02:00
Daniel Lubarov
f6d48f1328
Serialize zero as [0] rather than [] in bytecode (#592) 2022-07-01 09:29:56 -07:00
wborgeaud
797bece7bd First attempt 2022-07-01 18:28:22 +02:00
Jacqueline Nabaglo
bc9e618967
Structured wrapper over CPU table row (#589)
* Structured wrapper over CPU table row

* Lints

* minor style

* Minor cleanup
2022-06-29 16:23:44 -07:00
wborgeaud
33cabb14de
Merge pull request #587 from mir-protocol/s_columns_registers
`registers` -> `columns`
2022-06-29 04:12:31 -05:00
wborgeaud
f30889b7d7 NUM_REGISTERS -> NUM_COLUMNS 2022-06-29 10:06:46 +02:00
wborgeaud
7812ad242c s/registers/columns 2022-06-29 10:02:03 +02:00
Hamish Ivey-Law
aa42312126
EVM Arithmetic Stark table (#559)
* First draft of 256-bit addition.

* Update comment.

* cargo fmt

* Rename addition evaluation file.

* Port ALU logic from SZ.

* Give a name to some magic numbers.

* `addition.rs` -> `add.rs`; fix carry propagation in add; impl sub.

* Clippy.

* Combine hi and lo parts of the output.

* Implement MUL.

* Suppress Clippy's attempt to make my code even harder to read.

* Next draft of MUL.

* Make all limbs (i.e. input and output) 16-bits.

* Tidying.

* Use iterators instead of building arrays.

* Documentation.

* Clippy is wrong; also cargo fmt.

* Un-refactor equality checking, since it was wrong for sub.

* Daniel comments.

* Daniel comments.

* Rename folder 'alu' -> 'arithmetic'.

* Rename file.

* Finish changing name ALU -> Arithmetic Unit.

* Finish removing dependency on array_zip feature.

* Remove operations that will be handled elsewhere.

* Rename var; tidy up.

* Clean up columns; mark places where range-checks need to be done.

* Import all names in 'columns' to reduce verbiage.

* cargo fmt

* Fix aux_in calculation in mul.

* Remove redundant 'allow's; more precise range-check size.

* Document functions.

* Document MUL instruction verification technique.

* Initial tests for ADD.

* Minor test fixes; add test for SUB.

* Fix bugs in generate functions.

* Fix SUB verification; refactor equality verification.

* cargo fmt

* Add test for MUL and fix some bugs.

* Update doc.

* Quiet incorrect clippy error.

* Clean up 'decode.rs'.

* Fold 'decode.rs' into 'arithmetic_stark.rs'.

* Force limb size to divide EVM register size.

* Document range-check warning and fix end value calc.

* Convert `debug_assert!`s into `assert!`s.

* Clean up various kinds of iterator usage.

* Remove unnecessary type spec.

* Document unexpected use of `collect`.
2022-06-29 11:56:48 +10:00
Daniel Lubarov
dec0765fb5
Tweak Merkle proof API and make it public (#588)
- Add `_to_cap` to existing methods for clarity
- Add variants which deal with Merkle roots instead of caps
- Simplify `verify_merkle_proof_to_cap` - it can call `verify_merkle_proof_to_cap_with_cap_index`
- Make them all public except `verify_merkle_proof_to_cap_with_cap_index`, which is pretty niche
2022-06-27 20:39:47 -07:00
Jacqueline Nabaglo
e3834a5335
Util for assembling EVM code to hex (#586)
This is just for debugging the kernel. It's fully disposable.
2022-06-27 18:08:03 -07:00