Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link retrievals to miners #65

Closed
8 tasks done
Tracked by #61 ...
bajtos opened this issue Feb 1, 2024 · 2 comments
Closed
8 tasks done
Tracked by #61 ...

Link retrievals to miners #65

bajtos opened this issue Feb 1, 2024 · 2 comments
Assignees

Comments

@bajtos
Copy link
Member

bajtos commented Feb 1, 2024

Currently, SPARK checks the retrieval of CIDs stored in Filecoin but does not know which deal it deal it is testing and which miner is expected to serve the retrieval.

We need to link the retrieval tasks to deals and miners.

There are different ways how to accomplish this.

  1. Convert DealProposal data into ContextID string, using the same algorithm as Boost/Frisbii. Then we can filter IPNI response to find the advertisement matching the ContextID of the deal we are testing.
  2. Alternatively, we may be able to map provider addresses to miners, but this is less robust.

After a bit of exploration in CheckerNetwork/fil-deal-context-id#1, I decided to use a different approach:

  • Let Spark checkers query the on-chain miner info (method Filecoin.StateMinerInfo) to find miner's libp2p identity. This identity should be the same as the identity provided in the IPNI response.

Tasks

  • Modify fil-deal-ingester to include MinerID in the data stored in Spark DB.
  • Modify spark-api to return MinerID in per-round tasks.
  • Modify spark checker to (1) Resolve MinerID to ProviderID (2) filter IPNI response using ProviderID (3) report MinerID and ProviderID in the measurement fields
  • Modify spark-api and spark-publish to record & publish MinerID fields
  • Modify spark-evaluate to include MinerID in the task/deal id (see feat: remove provider info from task definition spark-evaluate#143)
  • Update spark-evaluate to calculate per-miner stats for each round
  • Expose these stats via spark-stats and visualise them in our internal & public dashboards
  • Write a blog post explaining how we solve the problem of determining how to retrieve content stored in a given Filecoin deal

Cleanup/refactoring opportunities

Out of scope

@bajtos bajtos self-assigned this Feb 13, 2024
@bajtos bajtos moved this to 🏗 in progress in Space Meridian Feb 21, 2024
@bajtos
Copy link
Member Author

bajtos commented Mar 25, 2024

Cleanup/refactoring opportunities

Rename getTaskId to getDealId, see feat: new stat rate_of_deals_advertising_http spark-evaluate#151 (comment)

I feel the name "task id" better describes the value, so I am going to keep it as it is now.

@bajtos
Copy link
Member Author

bajtos commented May 2, 2024

Write a blog post explaining how we solve the problem of determining how to retrieve content stored in a given Filecoin deal

This will be a series of posts.

  1. How SPARK samples Filecoin deals: draft
  2. Blog post: How Spark Maps FIL+ LDN Deals to Content Identifiers #100
  3. Blog post: How SPARK discovers retrieval providers #101
  4. Blog post: Downloading content stored on Filecoin #102

@bajtos bajtos closed this as completed May 2, 2024
@github-project-automation github-project-automation bot moved this from 🏗 in progress to ✅ done in Space Meridian May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant