Tracking Proof Requests
This guide covers both tracking a proof request programmatically and using the Boundless Explorer.
Programmatically
When you submit a proof request to Boundless, you can track its status programmatically using the Boundless client. This allows you to integrate request monitoring directly into your applications.
Basic Request Tracking
Here's how to wait for a request to be fulfilled:
// Submit your request
let request = client.new_request()
.with_program(program)
.with_stdin(input)
.with_offer(offer_params);
let (request_id, expires_at) = client.submit_onchain(request).await?;
// Wait for the request to be fulfilled
tracing::info!("Waiting for request {:x} to be fulfilled", request_id);
let (journal, seal) = client
.wait_for_request_fulfillment(
request_id,
Duration::from_secs(5), // check every 5 seconds
expires_at,
)
.await?;
tracing::info!("Request {:x} fulfilled", request_id);
How It Works
The wait_for_request_fulfillment
method:
- Polls the request status at the specified interval (e.g., every 5 seconds)
- Checks for completion states:
Fulfilled
: Request completed successfully - returns journal and sealExpired
: Request timed out - returns an error- Other states: Continues polling
- Provides status updates via logging during the wait
Request Status Types
Boundless tracks these request states:
- Unknown: Request may be open for bidding or not exist
- Locked: A prover has committed to fulfilling the request
- Fulfilled: Proof generation completed successfully
- Expired: Request timed out before fulfillment
Error Handling
When tracking requests, handle these potential outcomes:
match client.wait_for_request_fulfillment(request_id, check_interval, expires_at).await {
Ok((journal, seal)) => {
// Process the fulfilled proof
tracing::info!("Proof received with journal: {:?}", journal);
}
Err(ClientError::MarketError(MarketError::RequestHasExpired(_))) => {
tracing::error!("Request expired before fulfillment");
// Handle expiration - maybe retry with different parameters
}
Err(e) => {
tracing::error!("Request tracking failed: {}", e);
// Handle other errors
}
}
Advanced Tracking
For more control, you can manually check request status:
// Check status once
let status = client.boundless_market.get_status(request_id, Some(expires_at)).await?;
match status {
RequestStatus::Fulfilled => {
// Retrieve the journal and seal for the fulfilled request
let (journal, seal) = client
.wait_for_request_fulfillment(request_id, Duration::from_secs(1), expires_at)
.await?;
}
RequestStatus::Locked => {
tracing::info!("Request locked by a prover, awaiting fulfillment");
}
RequestStatus::Expired => {
tracing::warn!("Request has expired");
}
RequestStatus::Unknown => {
tracing::info!("Request is open for bidding");
}
}
Boundless Explorer
Getting Started
The Boundless Explorer provides a straightforward web interface to monitor and analyze proof activity on the Boundless network.
Developers can track live proof request statuses, analyze associated costs, review transaction details, and assess proof performance metrics. Provers can monitor active requests, track earnings, evaluate their efficiency, and benchmark performance against peers.
Access the explorer to:
- Search through Orders and their current status.
- Check the list of all Boundless Requestors.
- Check the list of all Boundless Provers.
- View trends and analyze network patterns on the Stats page.
Need Help?
- Join our Discord community
- Report issues via GitHub