Skip to content

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

Merged
TomAFrench merged 3 commits intomasterfrom
tf/debug-context-non-optional-acvm
Oct 13, 2023
Merged

chore: make acvm a non-optional field on DebugContext#3149
TomAFrench merged 3 commits intomasterfrom
tf/debug-context-non-optional-acvm

Conversation

@TomAFrench
Copy link
Copy Markdown
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
…3149)

Co-authored-by: Tom French <git@tomfren.ch>
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