fix: comment ProverEngine::start() as sync-only#235
Open
dwgrantham wants to merge 8 commits intomainfrom
Open
Conversation
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
iljakuklic
reviewed
Jun 10, 2025
crates/prover-engine/src/lib.rs
Outdated
|
|
||
| /// Starts the prover engine. | ||
| /// | ||
| /// NOTE: This function can only be called synchronously and will block the calling thread. |
Contributor
There was a problem hiding this comment.
This could be detected at runtime, at least to an extent, with something like:
anyhow::ensure!(
tokio::runtime::Handle::try_current().is_err(),
StartingProverInRuntimeError,
);This will detect whether Tokio runtime is running. It will not detect if a runtime is running in general.
Author
There was a problem hiding this comment.
Do we want to try to detect the the Tokio runtime at runtime?
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
Freyskeyd
reviewed
Jul 1, 2025
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
Signed-off-by: Dave Grantham <dgrantham@polygon.technology>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Dave Grantham dgrantham@polygon.technology
Description
Fixes audit finding AGLO3.2-22.2. The fix per @Freyskeyd is to add comments marking the
ProverEngine::start()function as synchronous-only that can block the async runtime.Fixes agglayer/security #114
Additions and Changes
Bug fix (non-breaking change which fixes an issue)
Added comments to
ProverEngine::start()as well as the callsites.New feature (non-breaking change which adds functionality)
None
Breaking changes
None
PR Checklist: