Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

feat: track and report per-round retrieval metrics (attempts, failures, coverage)#136

Closed
Hany-Almnaem wants to merge 4 commits intoCheckerNetwork:mainfrom
Hany-Almnaem:feature/metrics-filecoin-fraction
Closed

feat: track and report per-round retrieval metrics (attempts, failures, coverage)#136
Hany-Almnaem wants to merge 4 commits intoCheckerNetwork:mainfrom
Hany-Almnaem:feature/metrics-filecoin-fraction

Conversation

@Hany-Almnaem
Copy link
Contributor

Summary

This PR introduces internal tracking of per-round retrieval metrics in the SPARK module to support better visibility into network coverage and reliability.

##Changes include:

  • Added a new lib/metrics.js module to track:
    • Total retrieval attempts per round
    • Retrieval failures per round
    • Unique (PayloadCID, SP) pairs tested per round
  • Integrated retrievalMetrics into spark.js:
    • Calls recordRetrieval() and recordFailure() within nextRetrieval()
    • Resets and reports metrics on each task loop in run()
  • Added a unit test: test/retrieval-metrics.test.js
    • Verifies counts, deduplication, and round indexing behavior

These metrics give insight into:

  • How much of the Filecoin network is being sampled by SPARK
  • How effective those retrieval attempts are
  • Which trends might indicate network degradation

This groundwork will later support building Grafana dashboards

Related Issue

Resolves #34

@bajtos
Copy link
Member

bajtos commented Jun 23, 2025

As mentioned on Slack, we will be sunsetting the permissionless Spark Checker node soon.

@bajtos bajtos closed this Jun 23, 2025
@github-project-automation github-project-automation bot moved this to ✅ done in CheckerNetwork Jun 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: ✅ done

Development

Successfully merging this pull request may close these issues.

Measure the fraction of Filecoin we are checking

2 participants