Skip to content

Conversation

@MoonBoi9001
Copy link
Member

Summary

Two optimizations for POI query handling in the index-node resolver:

  1. Make resolve_proof_of_indexing async - Removes synchronous block_on call that was blocking tokio worker threads while waiting for database queries. POI queries now properly yield to the async runtime.

  2. Parallelize publicProofsOfIndexing requests - Changes sequential for-loop to future::join_all for concurrent execution of batch POI requests.

Changes

  • server/index-node/src/resolver.rs
    • resolve_proof_of_indexing: fnasync fn, block_on(fut)fut.await
    • resolve_public_proofs_of_indexing: sequential loop → future::join_all
    • Added future import from graph::futures03

MoonBoi9001 and others added 2 commits January 24, 2026 15:39
Remove synchronous `block_on` call in `resolve_proof_of_indexing` which
was blocking tokio worker threads while waiting for database queries.

Before this change, each POI query blocked an entire tokio worker thread.

After this change, POI queries properly yield to the async runtime while
waiting for database I/O, allowing the connection pool to be fully utilized.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change the publicProofsOfIndexing resolver to process all POI requests
in parallel using `future::join_all` instead of sequentially in a for loop.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants