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

Refac/groth16 mpc #1372

Merged
merged 136 commits into from
Feb 19, 2025
Merged

Refac/groth16 mpc #1372

merged 136 commits into from
Feb 19, 2025

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Dec 25, 2024

Description

#1297, but using tools from Consensys/gnark-crypto#589.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • Test A
  • Test B

How has this been benchmarked?

  • Benchmark A, on Macbook pro M1, 32GB RAM
  • Benchmark B, on x86 Intel xxx, 16GB RAM

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Tabaie Tabaie requested a review from ivokub February 12, 2025 15:12
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments! It looks almost perfect now!

There are still some things I'm not sure about - one is that imo we're doing subgroup checks several times when using deserialized inputs. And I think that we could save a lot of memory when doing some operations inline instead of precomputing all the scalars. And lastly one thing about failing early in worker pools. See the inlined comments (i also unresolved some to continue discussion)

internal/utils/test_utils/test_utils.go Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/marshal.go Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/utils.go Outdated Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase1.go Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase1.go Outdated Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase1.go Outdated Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase1.go Outdated Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase2.go Outdated Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/phase2.go Show resolved Hide resolved
backend/groth16/bls12-377/mpcsetup/setup_test.go Outdated Show resolved Hide resolved
@Tabaie Tabaie requested a review from ivokub February 14, 2025 20:28
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @Tabaie for addressing the issues. Sorry for the long back and forth. There are still some performance optimisations and additional features, but I have collected them in #1428 for now. See if there is something missing there.

Good to merge from my side.

backend/groth16/bls12-377/mpcsetup/phase2.go Show resolved Hide resolved
@Tabaie
Copy link
Contributor Author

Tabaie commented Feb 19, 2025

Thank you for the detailed review @ivokub!

@Tabaie Tabaie merged commit a11febf into master Feb 19, 2025
5 checks passed
@Tabaie Tabaie deleted the refac/groth16-mpc branch February 19, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants