-
Notifications
You must be signed in to change notification settings - Fork 19
fix: comment ProverEngine::start() as sync-only
#235
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to try to detect the the Tokio runtime at runtime?
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
Signed-off-by: Dave Grantham [email protected]
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: