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: introduce program in noir_js #2886

Closed
wants to merge 15 commits into from
Closed

Conversation

kobyhallx
Copy link
Contributor

Description

Problem*

Resolves

Summary*

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kevaundray
Copy link
Contributor

Lets split this into two PRs -- the first one will introduce Create a new PR with master and not ignore the build artifacts

We then modify noir-starter so that it works in CI with that commit, then work on making noir-starter work with the program API

generateProof(decompressedWitness: Uint8Array, optimizeForVerifyInCircuit?: boolean): Promise<Uint8Array>;

// Generates a child proof. Child Proof will be verified in another Circuit.
generateChildProof(decompressedWitness: Uint8Array): Promise<Uint8Array>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Noting that this has changed from #2856

Copy link
Contributor

Choose a reason for hiding this comment

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

Did we end up with this naming? I kind of like @Savio-Sou suggestion of "intermediate proof" and "final proof" as it sound more descriptive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does that make sense in case where you are not doing recursion?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that make sense in case where you are not doing recursion?

The user would stick with generateFinalProof then. Not the cleanest but not the most unintuitive (while more intuitive than generateProof for recursion users, which could be a big group of devs as recursion would be needed for any fairly complex programs running in browsers.)

@kevaundray kevaundray mentioned this pull request Sep 29, 2023
5 tasks
@socket-security
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
typescript 5.1.5 None +0 40.1 MB typescript-bot

🚮 Removed packages: @aztec/bb.js@0.7.2

@Savio-Sou
Copy link
Collaborator

Resolves #2835?

@kobyhallx
Copy link
Contributor Author

Does that make sense in case where you are not doing recursion?

The user would stick with generateFinalProof then. Not the cleanest but not the most unintuitive (while more intuitive than generateProof for recursion users, which could be a big group of devs as recursion would be needed for any fairly complex programs running in browsers.)

What's the cleanest? So when creating regular proof what's the meaning of final in generateFinalProof? Is this suggesting me then that I have missed some step on the way? Sure generateFinalProof makes sense in context of recursive processing but on non-recursive is misleading.

For purpose of easier imagination should we adopt reference to something, like processing a tree? where there might be parent - child relationship?

final and intermediate are little misleading imo.

@Savio-Sou
Copy link
Collaborator

Savio-Sou commented Sep 29, 2023

What's the cleanest?

For non-recursion devs, nothing beats just generateProof.
Proving with generateFinalProof and generateParentProof sounds equally unintuitive to me if I'm not expecting an intermediate or child.

To get the best of both worlds, we could have generateFinalProof as a syntactic sugar of generateProof.
That way non-recursion devs would simply deal with generateProof, while recursion devs learn and code with generateIntermediateProof and generateFinalProof.

@kevaundray kevaundray closed this Oct 2, 2023
@TomAFrench TomAFrench deleted the kh-noir_js-followup branch November 20, 2024 12:02
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.

4 participants