-
Notifications
You must be signed in to change notification settings - Fork 16
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 section for random values and allow declaring names for accessing random values #86
Comments
A couple of questions here:
@bobbinth what did you have in mind when you wrote this comment? |
I was thinking that this section would be optional - but I can also see an argument for making it mandatory. If we do keep it optional, I think we should assume Regarding So, in this example:
We could access the first random value simply as |
I have a couple of questions:
|
@Overcastan great question. This comes down to how "random values" work. The proof protocol works in rounds. The prover sends a commitment to the verifier, then the verifier sends some randomness, then the prover sends another commitment using that randomness, then the verifier could send more randomness, etc.
In MidenVM and Winterfell, this is where we stop. Therefore at the moment, there's only one set of randomness, and that's the randomness which is used when building the "segment 1" trace. In theory in the future it would be nice to make this generic so that it would be possible to use AirScript for a system that has more rounds (and therefore more sets of randomness, used for segment 2, 3, etc...). However, for now we can keep it simple and just have the randomness be associated with the auxiliary trace. We haven't yet adjusted the AirScript language to make more segments possible anyway - only main (0) and aux (1) are supported. |
In other words, there's no need to do anything other than what's described in the original issue here and Bobbin's comment above. We'll leave handling of additional trace segments/randomness for the future |
Coming back to my earlier comment. I've realized that this section must be optional as there use cases when we don't need the second trace segment (i.e., we'd have only |
Should we return some type of Error if there are no |
@Overcastan sounds good to me. Also we have an open issue #46 that can probably be combined with this. Wdyt? |
Based on #128 and #129, I want to ask a point of clarification. My understanding from the discussion above was that the old method of using random values would still work, but we would now have the optional ability to define named random values. In other words, we would be able to do all of the following:
Have I misunderstood your intention @bobbinth ? |
I think the second and third examples work - but I was thinking of the first one a bit differently. Specifically, we would always have to specify
I'm open to other suggestions though. |
@bobbinth this is fine with me - it's exactly what I was trying to clarify. The first example was what we had previously, and I was trying to figure out if we were removing that functionality |
To make my statement more precise: if there are one or more |
For some backends it may be useful to have a
random_values
section. This section would enable naming/grouping of random values similar to how trace columns section allows for trace columns. The syntax for this section could look as follows:The above specifies that there should be 15 random available for use in auxiliary trace constraints, and that these random values will be available under variable $rand.
Similar to trace columns, we could name various values as follows:
The above specifies that a and b names could be used to refer to specific random values, and also that $rand variable could be used to refer to the entire vector.
Originally posted by @bobbinth in #53.
The text was updated successfully, but these errors were encountered: