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

GeneratorContext is not saved when calling pedersen #3077

Closed
kevaundray opened this issue Oct 26, 2023 · 0 comments · Fixed by #3079
Closed

GeneratorContext is not saved when calling pedersen #3077

kevaundray opened this issue Oct 26, 2023 · 0 comments · Fixed by #3079
Labels
C-barretenberg Component: barretenberg cryptography library

Comments

@kevaundray
Copy link
Contributor

Problem

Currently the context object is not saved when we call pedersen, so if we extend the generators we do not save the extended generators for the next call because the context object is created inside of the c_bind.

Solution

One solution is to pass the context as a parameter in the c_binds and save them in the typescript code. Pedersen would then have its own class that holds a WASM file similar to the Schnor class

@kevaundray kevaundray added the C-barretenberg Component: barretenberg cryptography library label Oct 26, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 26, 2023
@kevaundray kevaundray changed the title Context is not saved when calling pedersen GeneratorContext is not saved when calling pedersen Oct 26, 2023
kevaundray added a commit that referenced this issue Oct 27, 2023
Related to #3029 and resolves #3077 .

The generator context is initializing and extending generator data which
outlives the lifetime of the function (it stays alive for the lifetime
of wasm instance). There may be an argument in the future to add a
method that will arbitrarily extend the generators, so that they do not
get extended in the middle of a pedersen call, if this is wanted we can
open up a separate issue.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-barretenberg Component: barretenberg cryptography library
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant