Skip to content

Conversation

NikolasHaimerl
Copy link
Contributor

@NikolasHaimerl NikolasHaimerl commented Jun 27, 2025

PR: Add Provider RSR Scores Implementation

This PR adds a new scores worker that calculates and stores Provider Retrievability Success Rate (RSR) scores. The RSR is defined as the percentage of successful cache miss retrievals out of total cache miss attempts for each provider and proof set id.

Key Changes

  • Created a new scores Cloudflare Worker that calculates provider RSR scores from retrieval logs
  • Added a new database migration to create the provider_scores table
  • Implemented RSR calculation logic based on retrieval success rates
  • Added CI deployment workflow for the new worker
  • Set up scheduled daily execution to automatically update scores

Technical Implementation

  • RSR calculation looks at all retrieval attempts since the last calculation
  • Scores are stored with timestamps to allow for historical tracking
  • Scores are only calculated for cache misses to measure true provider retrieval capability
  • Scores are calculated per provider and proofset to be able to give an RSR value for a given proofset

Deployment

The scores worker will be deployed to the calibration environment and run on a daily cron schedule to update provider RSR scores.

Follow-up Work

  • Connect the scores to the Verifier contract to enable on-chain rewards
  • Consider additional performance metrics beyond simple success rate

Conversations on performance metrics for SPs:
FilOzone/filecoin-services#58 (comment)

Related to issues:
filcdn/roadmap#27
filcdn/roadmap#21

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