Hamy Ratoanina
30c944f778
Remove bootstrapping ( #1390 )
...
* Start removing bootstrapping
* Change the constraint for kernel code initializing
* Update specs
* Apply comments
* Add new global metadata to circuit methods
* Change zero-initializing constraint
* Apply comment
* Update circuit size range for recursive test
2023-11-30 10:04:08 -05:00
Hamy Ratoanina
64cc1000e7
Move stack_len_bounds_aux to general columns ( #1360 )
...
* Move stack_len_bounds_aux to general columns
* Update specs
* Apply comments
* Apply comment
2023-11-28 14:14:47 -05:00
Hamy Ratoanina
6d751b13c1
Remove values of last memory channel ( #1291 )
...
* Remove values of last memory channel
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
* Fix merge
* Apply comments
* Fix ASM
* Top stack documentation (#7 )
* Add doc file
* Apply comments
* Apply comments
* Fix visibility
* Fix visibility
---------
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-11-13 11:03:50 -05:00
Hamy Ratoanina
01bbf1a058
Constrain clock ( #1343 )
2023-11-09 16:42:18 -05: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
8903aec129
Change padding rule for CPU ( #1234 )
...
* Change padding rule for CPU
* Disable memory channels for padding rows
* Apply some of Jacqueline's comments
* Update halt routine
* Add clarifying comment
* Redundant constraints and padding bug
* Revert "Remove is_bootstrap_kernel column"
This reverts commit 49d92cb8f1b0ae9de76872f76af4429699ff692f.
* Make halt_state implicit
* Move halting logic constraints to dedicated module
* Include new module
* Update some comments
2023-09-15 17:46:58 -04:00
Linda Guiga
16227f90b9
Merge syscall and exceptions constraints.
2023-07-24 15:40:48 +01: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
Jacqueline Nabaglo
249e50ebcb
Get/set context ( #843 )
2022-12-11 10:59:14 -08:00
Jacqueline Nabaglo
29644e5111
Implement PC instruction ( #847 )
...
* Implement `PC` instruction
* lints
2022-12-11 10:41:32 -08:00
Jacqueline Nabaglo
95eeed46f0
Memory load/store constraints ( #839 )
2022-12-09 10:35:00 -08:00
Daniel Lubarov
906a47a1ef
generate_push and misc other progress
2022-11-30 17:45:31 -08:00
Daniel Lubarov
206f527338
Merge branch 'main' into jacqui/witness-generation
2022-11-30 10:09:57 -08:00
Jacqueline Nabaglo
87a9c002c9
Compiler errors + refactor
2022-11-28 13:19:40 -08:00
Jacqueline Nabaglo
205bd58f98
Witness generation work
2022-11-15 09:26:54 -08:00
Hamish Ivey-Law
1c87fbb712
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.
2022-11-09 10:47:15 +11: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
Jacqueline Nabaglo
d5cf53c227
Constraints for dup/swap ( #743 )
...
* Constraints for dup/swap
* Minor comments
* Daniel comments
* More comments
2022-10-03 12:31:43 -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
Jacqueline Nabaglo
084700a7f4
Memory channel for program counter ( #717 )
2022-09-22 18:09:23 -07:00
Jacqueline Nabaglo
cae5f4870c
Stack pointer + underflow/overflow checks ( #710 )
...
* Stack pointer + underflow/overflow checks
* Daniel comments
* Extra docs
2022-09-10 13:20:30 -07:00
Daniel Lubarov
aa87f2c3ba
Public memory
2022-08-25 20:19:18 -07:00
Jacqueline Nabaglo
b98dd47820
Permission levels, jumps, traps ( #653 )
...
* Permission levels, jumps, traps
* Tests passing
* PR comments + documentation
* Docs + minor bugfixes
* Tests
* Use already-defined `stop` and `exception` (but renamed to `sys_stop`, `fault_exception`)
* Daniel comments
2022-08-16 09:46:10 -07: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
e7b480deaf
Begin work on witness generation and kernel bootstrapping
2022-07-01 10:09:57 -07:00
Daniel Lubarov
2e818172f0
Parse and assemble kernel functions ( #567 )
...
* Parse and assemble kernel functions
Written in "EVM++" assembly. Later on we will add some priviledged opcodes (in unused opcode ordinals), making it an extension of EVM bytecode.
I don't think there's much of a standard for EVM assembly, but I loosely based the syntax on this [proposal](https://gist.github.com/axic/17ddbbce4738ccf4040d30cbb5de484e ).
* PR feedback
* tweaks for consistency
* terminology tweaks
* Update evm/src/cpu/kernel/opcodes.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
* Update evm/src/cpu/kernel/opcodes.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
* Update evm/src/cpu/kernel/opcodes.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2022-06-20 20:32:29 -07:00
Jacqueline Nabaglo
49219a2b11
NOT stark ( #565 )
...
* NOT operation stark
* Daniel PR comment
2022-06-14 16:55:08 -07:00
Jacqueline Nabaglo
47efff834f
EVM decode ( #553 )
...
* EVM decode
* Style and docs
* Daniel PR comments
* Minor style
* Work on tests
* Tests passing!
* Minor: fix comment
* William comments
2022-06-03 19:24:47 -07:00
Daniel Lubarov
c54896dcb8
Rename starky2 -> evm ( #547 )
2022-05-18 10:32:14 -07:00