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

Optimization: The running instance does not need to absorbed. #56

Closed
srinathsetty opened this issue May 13, 2022 · 2 comments
Closed

Optimization: The running instance does not need to absorbed. #56

srinathsetty opened this issue May 13, 2022 · 2 comments

Comments

@srinathsetty
Copy link
Collaborator

Given that the public IO of the incoming R1CS instance contains the hash of the running instance in addition to (params, U, i, z0, zi), we can skip absorbing the running instance.

huitseeker added a commit to huitseeker/Nova that referenced this issue Sep 27, 2023
- Integrated #[from] attribute in `SuperNovaError` for efficient use of `NovaError`.
- Consolidated call sites to use the conversion.
@varunthakore
Copy link
Contributor

varunthakore commented Jan 6, 2024

Hi @srinathsetty, can I work on this issue ?

My understanding is that since u.x[0] = Hash(params, U, i, z0, zi) and we are absorbing u at line 241, we can avoid absorbing U at line 240.

Nova/src/gadgets/r1cs.rs

Lines 240 to 241 in 48065b0

self.absorb_in_ro(cs.namespace(|| "absorb running instance"), &mut ro)?;
u.absorb_in_ro(&mut ro);

Similarly in NIFS::prove and NIFS::verify, we can avoid absorbing the RelaxedR1CSInstance U1.

U1.absorb_in_ro(&mut ro);

U1.absorb_in_ro(&mut ro);

We will have to update the const NUM_FE_FOR_RO and expected values in tests accordingly.

Let me know if this is fine. I can create a PR.

@srinathsetty
Copy link
Collaborator Author

@varunthakore Yes, that sounds great!

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