Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

[Feature] Proof of Storage #230

@xinaxu

Description

@xinaxu

Business Need

A fundamental selling point of Filecoin is daily publicly verifiable proof of storage as published in the WindowPoSt events. Partners have asked for this.

Requirements

  • As a Motion user I want to see the most recent WindowPoSt event for each object ID and Filecoin SP
  • As a Motion user I want to see at least the last six weeks of WindowPoSt events for each object ID and each SP where the object ID is stored
  • The event history can be presented as a list of boolean or map of datetime to boolean

Implementation Plan

Implement in Motion API only via /Status

  • A standalone service that offers pieceCID → dealID → proof history API
    • The service can be run as a local docker container that only collects data for interested SPs. It may also be run as a centralized service that stores history for all SPs
    • Query StateMinerSectors, this gives a list of sector on-chain infos that includes dealID so we can build pieceCID↔sectorID ↔ dealID
    • Query StateMinerFaults, this gives all sectors that failed the last windowpost, so we can build dealID↔sectorID↔is_faulty
    • Query StateMinerPartitions, this gives the partition number of sectors as well as which time during the day should SP submit the windowpost
    • Run above logic every day so that we get proof history for a given dealID
      • Above API is not available with GLIF. Need to ask them to add support
    • Motion will query this API to get the proof history for /status endpoint

Engineer needs to have some understanding of DDO so the underlying data schema can be reused for DDO

### Tasks
- [ ] Ask GLIF to allowlist StateMinerSectors, StateMinerFaults methods
- [ ] Build a service that offers pieceCID or dealID -> proof history lookup
- [ ] Integrate the proof history lookup service with Motion /status

Metadata

Metadata

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions