32 Commits

Author SHA1 Message Date
Daniel Lubarov
f6d48f1328
Serialize zero as [0] rather than [] in bytecode (#592) 2022-07-01 09:29:56 -07: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
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
Daniel Lubarov
34e73db42b
Memory naming tweaks (#579)
* Memory naming tweaks

- Define the channel count and value limbs in a single place, so they're easy to adjust.
- Standardize on "channels" which I think is more explicit, since e.g. `num_mem_ops` used to mean either the channel count or total operation count in a trace.

* feedback

* tweaks

* fmt
2022-06-27 16:03:56 -07:00
Daniel Lubarov
e73d01a037
packed_field -> packed (#584)
* `packed_field` -> `packed`

For cleaner imports; "field" is usually clear from context

* fix
2022-06-27 15:07:52 -07:00
Daniel Lubarov
3346d3f902
field_types -> types (#583)
* `field_types` -> `types`

Here too, I think "field" is usually clear from context, e.g. in `use plonky2::field::types::Field;`.

* fixes

* fmt
2022-06-27 12:24:09 -07:00
Daniel Lubarov
410e03349c
extension_field -> extension (#581)
It seems redundant in most contexts, e.g. `use plonky2::field::extension_field::Extendable;`. One could import `extension_field`, but it's not that common in Rust, and `field::extension` is now about as short.
2022-06-27 07:18:21 -07:00
Daniel Lubarov
7b75eaa98d
ASM macro support (#580)
* ASM macro support

Also recognize global labels as a PUSH target; previously it only considered local labels.

* macro test
2022-06-25 23:10:08 -07:00
Jacqueline Nabaglo
191ddf7bc1
Exponentiation kernel function (#574)
* Exponentiation kernel function

* Exponentiation: Hamish comments
2022-06-23 15:33:55 -07:00
Nicholas Ward
4a7ebf057b updated in line with main changes 2022-06-23 14:36:14 -07:00
Nicholas Ward
a7f6bf3b00 fmt 2022-06-23 14:01:22 -07:00
Nicholas Ward
de52e630e8 addressed comments 2022-06-23 14:01:22 -07:00
Nicholas Ward
9f22cc72c3 allow 'unused' functions 2022-06-23 14:01:22 -07:00
Nicholas Ward
d2eb3b141b addressed comments 2022-06-23 14:01:22 -07:00
Nicholas Ward
08be9811cd timestamp fixes 2022-06-23 14:01:18 -07:00
Nicholas Ward
0514cd9646 addressed comments 2022-06-23 14:00:59 -07:00
Nicholas Ward
939e63189b rename 2022-06-23 14:00:59 -07:00
Nicholas Ward
5707baee23 addressed comments 2022-06-23 14:00:56 -07:00
Nicholas Ward
7ba0652c01 all_stark 2022-06-23 14:00:44 -07:00
Nicholas Ward
03112f898a updated all_stark framework to include memory stark (doesn't pass yet) 2022-06-23 13:59:57 -07:00
Jacqueline Nabaglo
3aaab765dd
define columns for CTL closer to the constraints (#573) 2022-06-21 10:28:44 -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
1cc000d3e1
Connect logic stark to CPU (#569)
* WIP: connect logic stark to CPU

* Tests passing
2022-06-17 11:57:14 -07:00
Jacqueline Nabaglo
7cbce7bf6d
Remove redundant constraints (#568) 2022-06-15 11:27:40 -07:00
Jacqueline Nabaglo
1e44ee3681
EQ and ISZERO (#566) 2022-06-14 17:38:42 -07:00
Jacqueline Nabaglo
49219a2b11
NOT stark (#565)
* NOT operation stark

* Daniel PR comment
2022-06-14 16:55:08 -07:00
wborgeaud
e969f10b20 PR feedback 2022-06-13 18:54:12 +02:00
wborgeaud
fdd6a7cad8 Wired CPU and Keccak 2022-06-10 21:02:56 +02: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
wborgeaud
12a3155baf Ignore test instead of failing 2022-05-20 08:34:25 +02:00
wborgeaud
b3f873c66a Finish test 2022-05-19 11:10:10 +02:00
Daniel Lubarov
c54896dcb8
Rename starky2 -> evm (#547) 2022-05-18 10:32:14 -07:00