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

fix: improve R1CS folding test to verify cross-terms #311

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

0xObsidian
Copy link
Contributor

The test previously only checked folding of identical instances, missing cross-term verification.

Description

Now it:

  • Tests different R1CS instances (x=3 and x=-2)
  • Explicitly verifies cross-term computation (Az₁Bz₂ + Az₂Bz₁ - u₁Cz₂ - u₂Cz₁)
  • Verifies the complete folding operation with different instances

Testing the introduced fix

clone this pr branch and from the root directory, run:

cargo test --package nexus-nova --lib -- r1cs::tests::folded_with_relaxed_instance_is_satisfied --exact --show-output

Impact

This PR closes ticket #288

The test previously only checked folding of identical
instances, missing cross-term verification.

Description
-----------
Now it:
- Tests different R1CS instances (x=3 and x=-2)
- Explicitly verifies cross-term computation
  (Az₁Bz₂ + Az₂Bz₁ - u₁Cz₂ - u₂Cz₁)
- Verifies the complete folding operation with
  different instances

Testing the introduced fix
--------------------------
clone this pr branch and from the root directory, run:
----
cargo test --package nexus-nova --lib -- r1cs::tests::folded_with_relaxed_instance_is_satisfied --exact --show-output
----
@0xObsidian
Copy link
Contributor Author

0xObsidian commented Dec 11, 2024

Hi @h-hafezi and @sjudson
Feel free to let me know if you have any questions regarding this PR which addressing issue #288

@sjudson sjudson linked an issue Dec 11, 2024 that may be closed by this pull request
@sjudson
Copy link
Contributor

sjudson commented Dec 11, 2024

Thank you for this, we will review.

@sjudson sjudson self-requested a review December 11, 2024 14:20
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.

[BUG]: RelaxedR1CS test isn't complete
2 participants