-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poseidon2 half output #2514
base: main
Are you sure you want to change the base?
Poseidon2 half output #2514
Changes from 1 commit
0ee1f1f
2a2b952
50fa458
6707734
0037ad9
69fe102
c863bc3
444e2f9
2bca71f
dfb9f61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use std::machines::split::ByteCompare; | ||
use std::machines::split::split_gl::SplitGL; | ||
use std::machines::split::split_gl_vec::SplitGLVec8; | ||
use std::machines::split::split_gl_vec::SplitGLVec4; | ||
use std::machines::large_field::memory::Memory; | ||
use std::machines::range::Byte2; | ||
|
||
|
@@ -20,7 +20,7 @@ machine Main with degree: main_degree { | |
ByteCompare byte_compare; | ||
SplitGL split_machine(byte_compare, split_degree, split_degree); | ||
|
||
SplitGLVec8 split_vec_machine(memory, split_machine, split_vec_degree, split_vec_degree); | ||
SplitGLVec4 split_vec_machine(memory, split_machine, split_vec_degree, split_vec_degree); | ||
|
||
col fixed STEP(i) { 2 * i }; | ||
|
||
|
@@ -39,20 +39,16 @@ machine Main with degree: main_degree { | |
|
||
function main { | ||
// Store 8 field elements sequentially in memory | ||
mstore 100, 0; | ||
mstore 100, 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was there a reason for this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there was, I forgot. It feels like it had something to do with the removal of the |
||
mstore 104, 0xffffffff00000000; | ||
mstore 108, 0xfffffffeffffffff; | ||
mstore 112, 0xabcdef0123456789; | ||
mstore 116, 0x0000000100000002; | ||
mstore 120, 0x0000000300000004; | ||
mstore 124, 0x0000000500000006; | ||
mstore 128, 0x0000000700000008; | ||
|
||
// Split the previously stored field elements | ||
split 100, 200; | ||
|
||
// Assert the field elements are what was written | ||
assert_eq 200, 0; | ||
assert_eq 200, 1; | ||
assert_eq 204, 0; | ||
|
||
assert_eq 208, 0; | ||
|
@@ -64,23 +60,11 @@ machine Main with degree: main_degree { | |
assert_eq 224, 0x23456789; | ||
assert_eq 228, 0xabcdef01; | ||
|
||
assert_eq 232, 0x00000002; | ||
assert_eq 236, 0x00000001; | ||
|
||
assert_eq 240, 0x00000004; | ||
assert_eq 244, 0x00000003; | ||
|
||
assert_eq 248, 0x00000006; | ||
assert_eq 252, 0x00000005; | ||
|
||
assert_eq 256, 0x00000008; | ||
assert_eq 260, 0x00000007; | ||
|
||
// Same split, but now overlaping the input and output | ||
split 100, 104; | ||
|
||
// Assert the field elements are what was written | ||
assert_eq 104, 0; | ||
assert_eq 104, 1; | ||
assert_eq 108, 0; | ||
|
||
assert_eq 112, 0; | ||
|
@@ -92,18 +76,6 @@ machine Main with degree: main_degree { | |
assert_eq 128, 0x23456789; | ||
assert_eq 132, 0xabcdef01; | ||
|
||
assert_eq 136, 0x00000002; | ||
assert_eq 140, 0x00000001; | ||
|
||
assert_eq 144, 0x00000004; | ||
assert_eq 148, 0x00000003; | ||
|
||
assert_eq 152, 0x00000006; | ||
assert_eq 156, 0x00000005; | ||
|
||
assert_eq 160, 0x00000008; | ||
assert_eq 164, 0x00000007; | ||
|
||
return; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments act as a sort of documentation... do you really want them gone?