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

Running tolling example? #17

Open
samgalen opened this issue Jun 19, 2018 · 1 comment
Open

Running tolling example? #17

samgalen opened this issue Jun 19, 2018 · 1 comment

Comments

@samgalen
Copy link

samgalen commented Jun 19, 2018

Hi, I'm trying to get the tolling example to run using this tool. The issue that I'm currently running into is that when I try to run the binary pepper_prover_tolling, I get an assertion error that a constraint hasn't been satisfied.

I note that in your documentation, you mention that some of the examples may "porting the verifier's input generation function from the main release". What does that mean? Do you have any examples of some ported functions?

I'm happy to make a pull request with a working example once I'm done!

@maxhowald
Copy link
Contributor

maxhowald commented Jun 22, 2018

I was able to reproduce the assertion failure you mentioned.

It indicates that the prover's solution to the constraints is not valid, which means that either there is a bug in the way the prover is solving the constraints, or that the computation is set up incorrectly in some way, so that there is no valid solution.

The way input generation works is that, when you create a new computation, or compile one of the example computations without a corresponding file under input_gen, a default implementation is generated which sets all the inputs to the computation randomly. This will not work for all applications though, so you can edit this function, and it will not be overwritten if it exists already.

For the tolling example this is already done, see this file, which was adapted from the original here.

I'm pretty sure that when I added this code last year, it ran without an assertion failure, and the only other commits since then have been to update the version of libsnark used. In other words, if you check out commit fdc4a2db, (and blow away / re-install the dependencies using the script in thirdparty) you probably won't get the assertion failure any more, but, most likely, this just indicates that there is a bug that wasn't being caught before.

Unfortunately, the tolling example is large and thus a pain to debug. I'm not sure when I'll have time to look into it myself, but as a start, you can probably change some build flags in libsnark to enable extra debugging output to see which constraint is not being satisfied. Since the computation consists of thousands of constraints though, this might not be super-useful.

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

2 participants