Skip to content

Conversation

@dwgrantham
Copy link

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:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@dwgrantham dwgrantham requested a review from a team as a code owner June 10, 2025 20:04
@dwgrantham dwgrantham requested review from Freyskeyd and hadjiszs June 10, 2025 20:04
@github-actions github-actions bot added the bug Something isn't working label Jun 10, 2025
@dwgrantham dwgrantham added agglayer/provers and removed bug Something isn't working labels Jun 10, 2025
Signed-off-by: Dave Grantham <[email protected]>
@github-actions github-actions bot added the bug Something isn't working label Jun 10, 2025

/// Starts the prover engine.
///
/// NOTE: This function can only be called synchronously and will block the calling thread.
Copy link
Contributor

@iljakuklic iljakuklic Jun 10, 2025

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.

Copy link
Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agglayer/provers bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants