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

feat(nifs): impl Protogalaxy::prove #312

Merged
merged 4 commits into from
Jul 24, 2024
Merged

feat(nifs): impl Protogalaxy::prove #312

merged 4 commits into from
Jul 24, 2024

Conversation

cyphersnake
Copy link
Collaborator

@cyphersnake cyphersnake commented Jul 19, 2024

Motivation
Part of #266

Overview
Implement Protogalaxy::prove

Note
Since the tests involve refactoring existing code to test Vanilla (circuit reuse), I'll separate them into a separate PR

@cyphersnake cyphersnake self-assigned this Jul 19, 2024
@cyphersnake cyphersnake requested a review from chaosma July 22, 2024 13:23
@cyphersnake cyphersnake marked this pull request as ready for review July 22, 2024 13:23
src/nifs/protogalaxy/mod.rs Outdated Show resolved Hide resolved
@cyphersnake
Copy link
Collaborator Author

I forgot to mention yesterday that I would like to validate:

  • RelaxedPlonkTrace.U.E_commitment - just multiplies by l_0 every time, without any change. It looks like it could just be ignored for this fs.

  • The pdf states that the accumulator is a commit from witness. We do it at the sps level, and ck is not used at all within prove. Is this correct?

@chaosma
Copy link
Collaborator

chaosma commented Jul 23, 2024

I forgot to mention yesterday that I would like to validate:

  • RelaxedPlonkTrace.U.E_commitment - just multiplies by l_0 every time, without any change. It looks like it could just be ignored for this fs.

Ah, so the E_commitment is no longer needed and can be removed from protogalaxy's RelaxedPlonkInstance. It's role is replaced by e^* in the paper:

$$e^*=F(\alpha)L_0(\gamma)+Z(\gamma)K(\gamma)$$

  • The pdf states that the accumulator is a commit from witness. We do it at the sps level, and ck is not used at all within prove. Is this correct?

Yeah, since it's already commited in sps, we don't need to commit anything and the _ck can be removed from the parameter list of fn prove

@cyphersnake
Copy link
Collaborator Author

Ah, so the E_commitment is no longer needed and can be removed from protogalaxy's RelaxedPlonkInstance. It's role is replaced by e^* in the paper:

Maybe we can just use E_commitment as e*? In this case it will be easy to support both of folding scheme in one moment. Maybe with rename + doc comment

@chaosma
Copy link
Collaborator

chaosma commented Jul 24, 2024

Ah, so the E_commitment is no longer needed and can be removed from protogalaxy's RelaxedPlonkInstance. It's role is replaced by e^* in the paper:

Maybe we can just use E_commitment as e*? In this case it will be easy to support both of folding scheme in one moment. Maybe with rename + doc comment

It's a little bit tricker. Because the E_commiment is a point on ECC. And e^* is a field element. You cannot reuse the type here.

Base automatically changed from 266-prove-1 to main July 24, 2024 09:57
@cyphersnake
Copy link
Collaborator Author

It's a little bit tricker. Because the E_commiment is a point on ECC. And e^* is a field element. You cannot reuse the type here.

Oh, yes, you are right. If we ever support a prod with two or more FSs, then we should put E_commitment also on the level of the accumulator structure, so that all the special data for each FS would be in clear places

@cyphersnake cyphersnake merged commit 3c46270 into main Jul 24, 2024
1 check passed
@cyphersnake cyphersnake deleted the 266-prove-2 branch July 24, 2024 10:08
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