Skip to content

Invalidate prepared point cache on new setup#19

Merged
moodlezoup merged 1 commit into
mainfrom
fix/invalidate-cache
Apr 20, 2026
Merged

Invalidate prepared point cache on new setup#19
moodlezoup merged 1 commit into
mainfrom
fix/invalidate-cache

Conversation

@moodlezoup

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent stale Arkworks prepared-point caching by invalidating the global prepared-point cache when a new setup is persisted, ensuring subsequent operations don’t accidentally reuse prepared points from an old setup.

Changes:

  • Add invalidate_cache() to the Arkworks prepared-point cache implementation.
  • Re-export invalidate_cache() from the Arkworks backend module when cache is enabled.
  • Call invalidate_cache() after saving setups to disk (behind cfg(feature = "cache")).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/setup.rs Invalidates Arkworks prepared-point cache after persisting a setup.
src/backends/arkworks/mod.rs Re-exports invalidate_cache under the cache feature.
src/backends/arkworks/ark_cache.rs Implements invalidate_cache() to clear the global prepared cache.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/setup.rs
Comment thread src/setup.rs Outdated
@moodlezoup moodlezoup force-pushed the fix/invalidate-cache branch from 0dda701 to d2227fd Compare April 20, 2026 20:29
@sagar-a16z

Copy link
Copy Markdown
Collaborator

lgtm! :shipit:

@moodlezoup moodlezoup merged commit 1d3f032 into main Apr 20, 2026
9 checks passed
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.

3 participants