Skip to content

feat(proto): add prover requirements and status wire contract - #237

Merged
Farhad-Shabani merged 2 commits into
mainfrom
farhad/prover-requirements-proto
Jul 16, 2026
Merged

feat(proto): add prover requirements and status wire contract#237
Farhad-Shabani merged 2 commits into
mainfrom
farhad/prover-requirements-proto

Conversation

@Farhad-Shabani

@Farhad-Shabani Farhad-Shabani commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

The network enforces a performance bar on provers (latency budget + success rate), but there's no machine-readable way to get it — so bidder software can't factor the bar into its decisions and happily bids on requests it can't fulfill within the required budget. This adds the read-only contract to close that loop:

  • GetProverRequirements — the enforced budget (GREATEST(gas / min_mgas_per_second, floor_latency_seconds)) plus the suspension policy around it.
  • GetProverStatus — whitelist/HA flags and suspended_until (present only while a suspension is live), so a bidder can also react to its own suspension programmatically.

Server side lands in network-services. First consumer is the sp1-cluster bidder: it polls both, clamps its bid deadlines to the published bar, and pauses bidding with a clear error while suspended. The contract lives here because sp1-cluster pulls spn-network-types from this repo.

@Farhad-Shabani
Farhad-Shabani force-pushed the farhad/prover-requirements-proto branch from 6ce2b75 to 90c5929 Compare July 15, 2026 22:44
Comment thread proto/network.proto Outdated
returns (types.SuspendProverResponse) {}
// Get the network's prover performance requirements. A fulfilled request counts
// toward a prover's success rate only if fulfilled within
// `GREATEST(gas / min_mgas_per_second, floor_latency_seconds)` seconds of request

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be gas_used / 1_000_000 / min_mgas_per_second?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Farhad-Shabani
Farhad-Shabani merged commit 336ce79 into main Jul 16, 2026
4 checks passed
@Farhad-Shabani
Farhad-Shabani deleted the farhad/prover-requirements-proto branch July 16, 2026 20:06
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