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

chore: make acvm a non-optional field on DebugContext #3149

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves #2995 (comment)

Summary*

This PR addresses a workaround for the borrow checker in #2995.

repl holds two references to Context so we can't move the witness map out of the contained ACVM instance while repl (and so the references) exists.

As we don't need repl once we've finished execution, this PR explicitly drops repl to remove those references, We can then unwrap the RefCell and get at the contained Context to pull out the witness map.

cc @mverzilli @ggiraldez as you may be interested in this solution.

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.

* master:
  chore(debugger): avoid taking ownership of Circuit when building debug context  (#3147)
@TomAFrench TomAFrench enabled auto-merge October 13, 2023 18:27
@TomAFrench TomAFrench added this pull request to the merge queue Oct 13, 2023
Merged via the queue into master with commit c804c14 Oct 13, 2023
@TomAFrench TomAFrench deleted the tf/debug-context-non-optional-acvm branch October 13, 2023 21:27
Sakapoi pushed a commit to Sakapoi/noir_fork that referenced this pull request Oct 19, 2023
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.

2 participants