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

Revisiting transform_lc_map #363

Open
4 tasks done
weikengchen opened this issue Sep 2, 2022 · 3 comments
Open
4 tasks done

Revisiting transform_lc_map #363

weikengchen opened this issue Sep 2, 2022 · 3 comments
Assignees
Labels
D-hard Difficulty: hard P-medium Priority: medium T-performance Type: performance improvements

Comments

@weikengchen
Copy link
Member

Summary

I may hire someone to do a pass over transform_lc_map to see if we can make it faster.

See the following breakdown.

Start: Groth16::Prover
··Start: Constraint synthesis
··End: Constraint synthesis ....................................................25.365s
··Start: Inlining LCs
··End: Inlining LCs ............................................................59.181s
··Start: R1CS to QAP witness map
··End: R1CS to QAP witness map .................................................28.268s
··Start: Compute C
··End: Compute C ...............................................................48.037s
··Start: Compute A
··End: Compute A ...............................................................3.444s
··Start: Compute B in G1
··End: Compute B in G1 .........................................................2.373s
··Start: Compute B in G2
··End: Compute B in G2 .........................................................5.497s
··Start: Finish C
··End: Finish C ................................................................9.339µs
End: Groth16::Prover ...........................................................172.293s
Proof generation for one proof: 178.148426339

Problem Definition

The time transform_lc_map takes seems to be too high. In addition, we may want to see if it can be made parallel.

Proposal

Get a professional analysis of this code.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@weikengchen weikengchen added D-hard Difficulty: hard T-performance Type: performance improvements P-medium Priority: medium labels Sep 2, 2022
@weikengchen weikengchen self-assigned this Sep 2, 2022
@Pratyush
Copy link
Member

Pratyush commented Sep 2, 2022

What's the constraint system being used here? The reported numbers are indeed really high.

@weikengchen
Copy link
Member Author

Nonnative arithmetics: https://github.com/DZK-Labs/ark-yafa/blob/main/benches/curve25519_scalar_mul.rs#L165

This is about 4M constraints I believe.

@Pratyush
Copy link
Member

Pratyush commented Sep 2, 2022

That's surprising that it's that bad on such a small constraint count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-hard Difficulty: hard P-medium Priority: medium T-performance Type: performance improvements
Projects
None yet
Development

No branches or pull requests

2 participants