Hamy Ratoanina
4b40bc0313
Remerge context flags ( #1292 )
...
* Remerge context flags
* Apply comments and revert some unwanted changes
2023-10-30 12:56:11 -04:00
Linda Guiga
817e3e78e0
Combine DUP and SWAP ( #1254 )
...
* Combine dup and swap flags.
* Add comments
2023-10-18 17:32:43 -04:00
Hamy Ratoanina
1d60431992
Store top of the stack in memory channel 0 ( #1215 )
...
* Store top of the stack in memory channel 0
* Fix interpreter
* Apply comments
* Remove debugging code
* Merge commit
* Remove debugging comments
* Apply comments
* Fix witness generation for exceptions
* Fix witness generation for exceptions (again)
* Fix modfp254 constraint
2023-10-11 16:28:49 -04:00
Robin Salen
41a29f069b
Remove some dead_code in EVM crate ( #1281 )
...
* Remove unnecessary CpuArithmeticView.
* Remove AllChallengerState
* Remove RecursiveAllProof
* Remove unused generate methods
* Remove dead_code from cpu/columns
* Remove todo
---------
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-10-09 09:07:01 -04:00
Linda Guiga
d4a8026bf9
Combine mstore_general and mload_general into one flag ( #1188 )
...
* Combine mstore_general and mload_general into one flag
* Add comments and make stack constraints cleaner.
* Fix number of native instructions
* Ordering
* Cleanup
* Update calls to stack eval from latest main
---------
Co-authored-by: Robin Salen <salenrobin@gmail.com>
2023-09-14 19:51:02 -04:00
Robin Salen
06bc73f7ea
Combine arithmetic flags on the CPU side ( #1187 )
...
* 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>
2023-09-14 10:36:48 -04:00
Robin Salen
9508b49090
Move byte packing / unpacking to a distinct table ( #1212 )
...
* Duplicate Memory trace into BytePacking one
* Add mload_32bytes instruction
* Use dedicated ops for byte packing trace
* Change witness generation to reduce memory reads for MLOAD_32BYTES
* Remove segments
* Fix stack
* Fix extra product when fixing CTL for byte_packing
* Write output value in trace
* Add constraints for BYTE_PACKING table
* Add recursive constraints for BYTE_PACKING table
* Fix constraints
* Add address in trace and constraints
* Add timestamp and batch inputs into BytePackingOp struct
* Add extra column
* Fix BytePackingStark CTL
* Tiny fix in witness generation
* Fix the Memory CTL
* Add constraints for the new columns
* Remove 1 column
* Remove limb columns
* Fix
* Fix recursive circuit of BytePackingTable
* Fix constraints
* Fix endianness
* Add MSTORE_32BYTES instruction and move decomposition to packing table
* Add missing constraint
* Add range-check for all bytes
* Add extra constraint
* Cleanup
* Remove REMAINING_LEN column
* Add corresponding implementations in interpreter
* Fix recursive version
* Remove debug assertion because of CI
* Remove FILTER column
* Update new test from rebasing
* Reorder STARK modules to match TraceCheckPoint ordering
* Address comments
* Pacify clippy
* Add documentation to the packing module
* Fix doctest
2023-09-13 04:45:37 +10:00
Linda Guiga
c3cb227896
Combine get_context and set_context into one flag
2023-08-21 23:12:25 +01:00
Hamy Ratoanina
815a02ab75
Remove is_cpu_cycle
2023-08-15 15:22:41 -04:00
Hamy Ratoanina
12f379f99b
Combine jump flags
2023-08-14 19:08:24 -04:00
Robin Salen
7829dccf83
Combine EQ and ISZERO flags
2023-08-12 11:08:01 -04:00
Robin Salen
e10eaad09b
Combine all logic flags together
2023-08-11 10:17:45 -04:00
Robin Salen
ee9ce4c59d
Combine AND and OR flags in CpuStark
2023-08-09 16:05:24 -04:00
Jacqueline Nabaglo
cedeff5219
PUSH0
2023-06-13 13:29:30 -07:00
Jacqueline Nabaglo
b7220428b3
Error handling
2023-06-02 15:51:26 -07:00
Jacqueline Nabaglo
f3946f75bf
Gas constraints ( #880 )
...
* Gas constraints
* Bugfix
* make test pass post rebase
2023-02-14 22:30:19 -08:00
Hamish Ivey-Law
40866e775a
Refactor arithmetic operation traits ( #876 )
...
* Use U256s in `generate(...)` interfaces; fix reduction bug modular.
* Refactor `Operation` trait.
* Rename file.
* Rename `add_cc` things to `addcy`.
* Clippy.
* Simplify generation of less-than and greater-than.
* Add some comparison tests.
* Use `PrimeField64` instead of `RichField` where possible.
* Connect `SUBMOD` operation to witness generator.
* Add clippy exception.
* Add missing verification of range counter column.
* Fix generation of RANGE_COUNTER column.
* Address William's PR comments.
2023-02-10 23:07:57 +11:00
Daniel Lubarov
526dc9bb77
Flush out operation list
2022-11-30 21:00:48 -08:00
Jacqueline Nabaglo
87a9c002c9
Compiler errors + refactor
2022-11-28 13:19:40 -08:00
Jacqueline Nabaglo
626c2583de
Combine all syscalls into one flag ( #802 )
...
* Combine all syscalls into one flag
* Minor: typo
* Daniel PR comments
2022-11-07 12:29:28 -08:00
Jacqueline Nabaglo
ec3391f9c4
Add Fp254 ops to the CPU table ( #779 )
...
* Add Fp254 ops to the CPU table
* Add forgotten file
2022-10-13 14:02:19 -07:00
Daniel Lubarov
9e483528d3
MPT hashing logic, part 3
2022-10-02 09:11:39 -07:00
Jacqueline Nabaglo
e978425b26
Connect stack to memory ( #735 )
...
* Connect stack to memory
* Daniel PR comment
2022-09-28 15:18:56 -07:00