Skip to content

fix(store): move local block proving off async runtime#2108

Open
Ollie202 wants to merge 3 commits into
0xMiden:nextfrom
Ollie202:fix/store-local-block-prover-blocking
Open

fix(store): move local block proving off async runtime#2108
Ollie202 wants to merge 3 commits into
0xMiden:nextfrom
Ollie202:fix/store-local-block-prover-blocking

Conversation

@Ollie202
Copy link
Copy Markdown
Contributor

Partially addresses #1976.

Problem

BlockProver::prove is async, but the local store prover path calls LocalBlockProver::prove directly. Local block proving is CPU-heavy synchronous work, so running it on a Tokio worker can starve the async runtime.

Changes

  • Move local store block proving into spawn_blocking_in_current_span.
  • Clone the block header into the blocking task so the prover call owns everything it needs.
  • Add a separate StoreProverError variant for blocking task join failures.
  • Add a changelog entry for the follow-up fix.

Testing

  • rustfmt crates/store/src/server/block_prover_client.rs
  • git diff --check

I also tried cargo check -p miden-node-store and cargo check --manifest-path crates/store/Cargo.toml, but both stop before compiling because the current protocol git dependency tries to check out an agglayer submodule file with : in the filename on Windows:

tools/addRollupType/addRollupMainnet10/add_rollup_type_10_output-2025-03-11T15:54:21.263Z.json

@Ollie202 Ollie202 force-pushed the fix/store-local-block-prover-blocking branch from b62a7c2 to 0146c60 Compare May 20, 2026 16:58
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.

1 participant