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: reintroduce backend.inspect #802

Merged
merged 5 commits into from
Dec 23, 2024
Merged

Conversation

nbaztec
Copy link
Collaborator

@nbaztec nbaztec commented Dec 23, 2024

What 💻

  • Reintroduces Backed::inspect that was previously removed due to re-entrancy issues.
  • An additional inspect_ctx: Box<dyn Any> is now added to Backend::inspect to tightly couple any zk-specific data we'd need to pass.
    • It's not set in ctx as it must not be persisted beyond the call (and also immediately used), which isn't guaranteed due to the additional indirection via Backend::inspect.
    • Additionally, we cannot modify a CowBackend to set inspect_ctx on the inner backend context as it will always clone the &Backend immediately.
    • The issues above are solvable by inlining inspect calls directly in executor (as was done previously) but then we diverge from foundry code.

Why ✋

  • Stay close to foundry code.

Evidence 📷

Tests pass

@nbaztec nbaztec requested a review from a team as a code owner December 23, 2024 16:35
@nbaztec nbaztec merged commit 4e50046 into main Dec 23, 2024
27 checks passed
@nbaztec nbaztec deleted the nish-revert-inspect-strategy branch December 23, 2024 21:23
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