* Add memory checks for prover_input and range_checks for prover_input, syscalls and exceptions
* Replace u32 by U256, and remove extra CTLs
* Add column in ArithmeticStark to use ctl_arithmetic_base_rows for is_range_check
* Fix CTLs and circuit constraint.
* Fix CTLs
* Remove extra shift CTL.
* Change order of inputs for the arithmetic shift operations. Add SHR test. Fix max number of bit shifts. Cleanup.
* Fix SHR in the case shift >= 256
* Limit visibility of helper functions
* Combine FP254 flags
* Combine basic binary ops together and do CTL with opcode value
* Combine ternary ops together
* Combine MUL DIV and MOD
* Combine shift operations
* Combine byte with other binary ops
* Fix tests
* Clean leftover comment
* Update from latest main
* Put the 'is_simulated' flag inside the Operation enum
* Cleaner way to handle "simulated" operations SHL and SHR.
* Fix comments.
* Minor: suggestion for re-expressing `combined_ops`.
* Update comment
---------
Co-authored-by: Hamish Ivey-Law <hamish@ivey-law.name>
* First draft.
* Separate out mulmod constraint poly from the rest.
* Offset quot limbs when doing SUB* operations.
* Refactor constr_poly calculation.
* Clippy.
* Constrain the hi part of quot to be 0 or 1 for SUB* ops.
* Simplify storage and handling of negative quotient limbs.
* Remove unnecessary constant; move another to main file.
* Move constant back; cast properly.
* First draft of linking arithmetic Stark into the CTL mechanism.
* Handle {ADD,SUB,MUL}FP254 operations explicitly in `modular.rs`.
* Adjust argument order; add tests.
* Add CTLs for ADD, MUL, SUB, LT and GT.
* Add CTLs for {ADD,MUL,SUB}MOD, DIV and MOD.
* Add CTLs for {ADD,MUL,SUB}FP254 operations.
* Refactor the CPU/arithmetic CTL mapping; add some documentation.
* Minor comment fixes.
* Combine addcy CTLs at the expense of repeated constraint evaluation.
* Combine addcy CTLs at the expense of repeated constraint evaluation.
* Merge `*FP254` CTL into main CTL; rename some registers.
* Connect extra argument from CPU in binary ops to facilitate combining with ternary ops.
* Merge modular ops CTL into main CTL.
* Refactor DIV and MOD code into its own module.
* Merge DIV and MOD into arithmetic CTL.
* Clippy.
* Fixes related to merge.
* Simplify register naming.
* Generate u16 BN254 modulus limbs at compile time.
* Clippy.
* Add degree bits ranges for Arithmetic table.
* Unify handling of ADD, SUB, LT, GT under the formula x+y=z+cy*2^256.
* Rename general column ranges to "registers" instead of "inputs".
* Rename 'compare' module to 'addcc'.
* Update comments.
* Enforce length equality in iteration.
* Address William's PR comments.
* Simplify loop and remove clippy.
* Offset auxiliary coefficients so they're always positive.
* Split mul aux input into lo/hi parts.
* Rename register.
* Combine `QUO_INPUT_{LO,HI}`; rearrange some columns.
* Split `MODULAR_AUX_INPUT` into high and low pieces.
* Remove range_check_error debug output.
* First draft of generating the range checks.
* Remove opcodes for operations that were defined elsewhere.
* Clean up interface to build arithmetic trace.
* Fix "degree too high" bug in DIV by zero.
* Fix constraint_transition usage in recursive compare.
* Fix variable name; use named constant.
* Fix comment values.
* Fix bug in recursive MUL circuit.
* Superficial improvements; remove unnecessary genericity.
* Fix bug in recursive MULMOD circuit.
* Remove debugging noise; expand test.
* Minor comment.
* Enforce assumption in assert.
* Make DIV its own operation.
* Make MOD it's own operation; rename structs; refactor.
* Expand basic test.
* Remove comment.
* Put Stark operations in their own file.
* Test long traces.
* Minor comment.
* Address William's comments.
* Use `const_assert!` instead of `debug_assert!` because Clippy.
* Add comments about number of columns used.
* Split modular operations across two rows.
* Fix test setup.
* Use constraint_transition() in common code.
* Ensure all inputs/outputs are on the first row.
* Fix constraint for single-row ops.
* Tidy up loop; make MODULAR_AUX_INPUT length reflect reality.
* Use static `KERNEL` in tests
* Print opcode count
* Update criterion
* Combine all syscalls into one flag (#802)
* Combine all syscalls into one flag
* Minor: typo
* Daniel PR comments
* Check that `le_sum` won't overflow
* security notes
* Test reverse_index_bits
Thanks to Least Authority for this
* clippy
* EVM shift left/right operations (#801)
* First parts of shift implementation.
* Disable range check errors.
* Tidy up ASM.
* Update comments; fix some .sum() expressions.
* First full draft of shift left/right.
* Missed a +1.
* Clippy.
* Address Jacqui's comments.
* Add comment.
* Fix missing filter.
* Address second round of comments from Jacqui.
* Remove signed operation placeholders from arithmetic table. (#812)
Co-authored-by: wborgeaud <williamborgeaud@gmail.com>
Co-authored-by: Daniel Lubarov <daniel@lubarov.com>
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
Co-authored-by: Hamish Ivey-Law <426294+unzvfu@users.noreply.github.com>