Skip to content

feat: Add section on bn128 curve termination and memory management in proofs.mdx #1020

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Jul 31, 2025

Description

This PR adds a new section to the proofs.mdx documentation covering best practices around memory management when working with the bn128 elliptic curve in Semaphore. Specifically, it explains why explicit curve termination is necessary in Node.js environments and how to implement it properly using ffjavascript.

The addition includes:

  • A detailed explanation of curve termination and potential memory leaks
  • Usage examples for both application and test environments
  • Best practices to ensure safe and clean memory handling
  • Code snippets that follow Semaphore conventions

Related Issue(s)

Fixes #897

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn format and yarn lint without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Important

We do not accept pull requests for minor grammatical fixes (e.g., correcting typos, rewording sentences) or for fixing broken links, unless they significantly improve clarity or functionality. These contributions, while appreciated, are not a priority for merging. If you notice any of these issues, please create a GitHub Issue to report them so they can be properly tracked and addressed.

@crStiv crStiv requested a review from a team as a code owner July 31, 2025 14:31
@crStiv crStiv changed the title Update proofs.mdx feat: Add section on bn128 curve termination and memory management in proofs.mdx Jul 31, 2025
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.

Add documentation to explain how to terminate the bn128 curve
1 participant