Skip to content

fix(network-monitor): move local proving off async runtime#2136

Open
Ollie202 wants to merge 1 commit into
0xMiden:nextfrom
Ollie202:fix/network-monitor-blocking-work
Open

fix(network-monitor): move local proving off async runtime#2136
Ollie202 wants to merge 1 commit into
0xMiden:nextfrom
Ollie202:fix/network-monitor-blocking-work

Conversation

@Ollie202
Copy link
Copy Markdown
Contributor

Partially addresses #1976.

Problem

The network monitor still performs local transaction execution and proof generation directly from async code in two places:

  • counter account deployment
  • periodic counter increment submission

Both paths can run CPU-heavy VM/prover work without yielding, which can starve Tokio worker threads while the monitor is running.

Changes

  • Move counter account deployment execution/proving into spawn_blocking_in_current_span.
  • Move counter increment execution/proving into spawn_blocking_in_current_span.
  • Add Clone for MonitorDataStore so the blocking task owns a fresh in-memory datastore and can rebuild its MAST store from the loaded accounts.
  • Add a changelog entry for the Execution and signing is blocking in an async runtime #1976 follow-up.

Testing

  • cargo +nightly fmt --check --all
  • git diff --check

I also tried cargo check -p miden-network-monitor, but it stops before compiling on Windows because the current protocol dependency pulls an AggLayer submodule file with : in the filename:

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

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