Skip to content
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

bellman: why is the first entry of pvk.ic skipped? #255

Closed
hdevalence opened this issue Jul 17, 2020 · 3 comments
Closed

bellman: why is the first entry of pvk.ic skipped? #255

hdevalence opened this issue Jul 17, 2020 · 3 comments

Comments

@hdevalence
Copy link
Contributor

for (i, b) in public_inputs.iter().zip(pvk.ic.iter().skip(1)) {

skips the first entry of pvk.ic. Because it is used to initialize acc, this has the effect that it is added into the sum with fixed coefficient 1.

The verification description in the spec doesn't mention anything about a fixed coefficient:
Screenshot from 2020-07-17 11-19-05

@swasilyev
Copy link

swasilyev commented Jul 17, 2020

The first public input is reserved to be the scalar field unity, starting from the original Gro16 article. It allows eg constants in linear combinations.

@daira
Copy link
Contributor

daira commented Jul 19, 2020

The encodings of the public circuit inputs, including the fixed 1 element, are specified in Appendices A.4 and A.5. This is also why the number of elements is ℓ+1 rather than ℓ. Granted this isn't obvious and there should be more cross-referencing (also, those sections aren't quite finished).

@hdevalence
Copy link
Contributor Author

Thanks for the explanation -- should there be a note explaining this in the source? I'm happy to add one separately or as part of #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants