-
Notifications
You must be signed in to change notification settings - Fork 39
fix/0-instances #521
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
fix/0-instances #521
Conversation
encode_rv32(ADD, 2, 3, 3, 0), // add x3, x2, x3 | ||
encode_rv32(BLTU, 0, 3, 0, -8_i32 as u32), // bltu x0, x3, -8 | ||
// End. | ||
encode_rv32(JAL, 0, 0, 1, 4), // jal x1, 4 |
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.
Test with 0 instances of JAL. Does nothing anyway.
@hero78119 I'm not totally convinced by this solution because since the commitments are optional, that gives degrees of freedom for the prover and that's no good with Fiat-Shamir. There should be some commitment to the choice of circuits in the transcript. For example, the numbers of instances (including number 0). Or some circuit ID. Is there something like this? |
@naure this raises an excellent point for discussion! Including the number of instances in the transcript could be beneficial, but I'd also like to explore the implications of leaving the number of instances out of the transcript. The number of instances holds a particularly significant role in our system, which makes this consideration especially interesting Giving pc However, it bring up a further examine, if prover set number of instance to 0 of an opcode, then the free-input candidate is the witness commitments of this opcode. Thus in verifier, if an opcode instance is set as 0, it commitment need to be |
To ensure soundness, also consult @dreamATD’s opinion on whether its necessary to include the number of instances in the transcript :) In other word, in Ceno paper (Asymmetric Sumcheck Protocol), does ![]() |
Indeed, no issues with the constraints. It’s about the IOP:
Right! Or in other words:
I’m tracking this question in #542. Let’s go with this PR to unblock e2e testing, and continue discussion there? |
In my previous VM we solved a similar problem by just always requiring people to commit to some positive number of instances, and didn't allow zero. (In our case, all our tables had to be padded to a power of two and for further technical reasons we needed at least four. So that's what we padded everything to.) I'm not sure if any of this applies here. In any case, I'm very in favour of making it possible to prove the execution of a program that has 0 occurrences of specific features or instructions. |
If there is no instances of any particular instruction / opcode, why do we bother to prove them as the accumulated |
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.
LGTM!
Checked with @dreamATD and also suggested add num_instance to transcript as well for more safety.
I think add stuff in transcript is easiler, but we need to ruling out behind the scene for what need to be added and what needless.
Thanks for raising separete issue #542 and we can move discussion there!
Issue #433
Extracted from #368