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

R1CS Folding with ZeroFold #346

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Forpee
Copy link
Contributor

@Forpee Forpee commented Dec 21, 2024

Hi @srinathsetty,

This PR implements the folding scheme for R1CS from the NeutronNova paper.
The full protocol has been implemented, although there are still improvements to be made. I would appreciate a review from you first to ensure the PR is heading in the right direction before I proceed with the enhancements.

The improvements to be addressed are:

  • Batch the two Sumfold instances into one, as specified in the paper.
  • In the NIFS protocol replace the Keccak transcript with PoseidonRO, enabling the implementation of a verifier circuit. (I used keccak for the initial review becuase the main annoyance I encountered is that the RO only allows one squeeze per RO instantiation. I would appreciate your input on whether we can modify this behavior.)
  • Refactor the Sumfold prover implementation, but I'll wait to batch the Sumfold instances first. A SumFoldEngine trait may be useful here.

__

The test is in this file src/neutron_nova/tests

cargo test --lib -- neutron_nova::tests::test_tiny_r1cs_bellpepper

Thanks!

@Forpee Forpee changed the title R1CS Folding with Zero-Fold R1CS Folding with ZeroFold Dec 21, 2024
@srinathsetty
Copy link
Collaborator

In the NIFS protocol replace the Keccak transcript with PoseidonRO, enabling the implementation of a verifier circuit. (I used keccak for the initial review becuase the main annoyance I encountered is that the RO only allows one squeeze per RO instantiation. I would appreciate your input on whether we can modify this behavior.)

Yes, the current RO interfaces squeezing only one challenge. We could potentially expand it to support multiple challenges, but this might make things more complex than necessary. An alternative would be to to create a new transcript, put the last challenge from the previous round as the first entry in the new transcript. This will allow multiple rounds and challenges.

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.

2 participants