-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add Arith256Memory
machine
#2109
Conversation
549bb2b
to
d578b3d
Compare
Arith256Memory
machineArith256Memory
machine
@@ -267,7 +267,8 @@ machine Main with degree: 65536 { | |||
assert_eq t_0_0, t_0_1, t_0_2, t_0_3, t_0_4, t_0_5, t_0_6, t_0_7, 0x70afe85a, 0xc5b0f470, 0x9620095b, 0x687cf441, 0x4d734633, 0x15c38f00, 0x48e7561b, 0xd01115d5; | |||
assert_eq t_1_0, t_1_1, t_1_2, t_1_3, t_1_4, t_1_5, t_1_6, t_1_7, 0xf4062327, 0x6b051b13, 0xd9a86d52, 0x79238c5d, 0xe17bd815, 0xa8b64537, 0xc815e0d7, 0xa9f34ffd; | |||
|
|||
// Auto-generated rest of the test cases: | |||
// Auto-generated rest of the test cases, | |||
// see: https://gist.github.com/georgwiese/a66425ae95c839b548edffffe6a692f9 |
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.
Thankfully, I found an old Python notebook that used to generate these tests. I uploaded them to Gist and linked it here for future reference. The script also contains code to generate the memory tests.
Fixes a bug I encountered in #2109: - For blog machines, we have a cache which tracks a sequence of solving steps that led to a success in the past. - However, the needed sequence could be different from call to call. In particular, it could depend on the operation ID. - Because of that, in #1562, we added that the "default" sequence iterator is always run after the cached sequence. - But, we never called `report_progress()` on the default iterator, which led to a bug in #2109.
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.
crazy
.unwrap(); | ||
|
||
test_halo2(make_simple_prepared_pipeline(f)); | ||
} |
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.
Why all but P3?
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.
Done. Also added to the "normal" arith test.
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.
Sorry, reverted again. It fails because the constraint degree is too large.
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.
ah true. Does this actually run with Halo2 in CI?
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.
Yes, think so!
Byte2 byte2; | ||
|
||
// One-hot encode the operation | ||
pol commit is_affine, is_mod, is_ec_add, is_ec_double; |
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.
col witness?
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.
done
still needs updates |
This reverts commit bb70d2c.
Depends on #2117
This PR adds a new
Arith256Memory
machine. It is largely a copy ofstd::machines::large_field::arith::Arith
, but receives its inputs / writes its outputs via a memory pointer.The first commit copies the existing machine and test. So, I would recommend reviewing the diff to the first commit.