4 Commits

Author SHA1 Message Date
Daniel Lubarov
aae9e49e90
Merge pull request #696 from mir-protocol/public_memory
Public memory, part 1
2022-08-25 23:48:01 -07:00
Daniel Lubarov
aa87f2c3ba Public memory 2022-08-25 20:19:18 -07:00
Hamish Ivey-Law
50c9638b55
EVM arithmetic unit: unsigned comparisons (#688)
* Refactor u256 calculation; return cy/br from calculations.

* Implement less than and greater than operations.

* Add file documentation.
2022-08-26 09:13:47 +10: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