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

Allow cost model to be called without an actual witness #30

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

iquerejeta
Copy link
Collaborator

We create an object that runs Synthesise, similar to the mock prover, but without unwrapping the witnesses. Now we just extend the number of rows for every new row used in a witness assignment, but we don't try to extract its value.

This enables running the cost model without a witness.

We also remove the support to different commitment schemes, as we currently only support KZG.

Closes #28

* Support only one polynomial commitments scheme.
* Rename ModelCircuit -> CircuitModel
Avoid running MockProver for cost model

We copied the `Assignment` implementation of the MockProver, but in here we do not need to unwrap the witnesses (which was why the MockProver always needed `Value::known` instead of `Value::unknown`.

Now we can run the cost model without assigned values.
@iquerejeta iquerejeta force-pushed the iquerejeta/minor_update branch from 674a9ff to b5053c0 Compare January 24, 2025 16:09
Copy link

@miguel-ambrona miguel-ambrona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

It would be even better if from_circuit_to_circuit_model did not take the instances. I believe we are not really doing anything with them. Maybe you need to get the length of every instance column, but that would already be better than a whole vector of instances.

Still, it would be great not to have to deal with the instances in any way.

@miguel-ambrona
Copy link

Maybe now that you have control of the query_instance. You can keep track of the max row this function is being called on every column. Thus obtaining the expected nb of public inputs per instance col.

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

Successfully merging this pull request may close these issues.

Fixed columns in cost model + remove commitment scheme structure (with IPA, GWC and SHPLONK)
2 participants