Skip to content

feat: add f41 PDP deal support to deal tracker#609

Draft
anjor wants to merge 2 commits intomainfrom
feat/f41-deal-tracker
Draft

feat: add f41 PDP deal support to deal tracker#609
anjor wants to merge 2 commits intomainfrom
feat/f41-deal-tracker

Conversation

@anjor
Copy link
Collaborator

@anjor anjor commented Feb 5, 2026

Summary

Adds support for tracking f41 PDP (Proof of Data Possession) deals alongside legacy f05 market deals.

Part of Filecoin Foundation contract milestone 1 — depends on go-synapse PR #2 for full integration.

Changes

Model Updates (model/replication.go)

  • Added DealType type with values market (legacy f05) and pdp (f41)
  • Added DealType field to Deal struct with default 'market'
  • Added PDP-specific fields:
    • ProofSetID - on-chain proof set ID
    • ProofSetLive - whether proof set is actively challenged
    • NextChallengeEpoch - next challenge due epoch

Worker Type (model/basetypes.go)

  • Added PDPTracker worker type

Migration (model/migrate.go)

  • Added inferDealTypes() to set deal_type='market' for existing deals

Deal Tracker (service/dealtracker/dealtracker.go)

  • Updated to set DealType: model.DealTypeMarket when inserting market deals

PDP Tracker Service (service/pdptracker/pdptracker.go)

  • New service with PDPClient interface for go-synapse integration
  • Tracks proof sets for wallets
  • Updates deal status based on on-chain state
  • Currently a stub awaiting go-synapse merge

CLI Updates

  • Added singularity run pdp-tracker command
  • Added --deal-type filter to singularity deal list

Next Steps (after go-synapse PR #2 merges)

  1. Add go-synapse as a dependency in go.mod
  2. Implement PDPClient interface using go-synapse's ProofSetManager
  3. Parse piece CIDs from proof set data
  4. Add comprehensive tests for PDP tracking

Testing

  • Build passes
  • Existing tests pass
  • PDP-specific tests (pending go-synapse integration)

anjor added 2 commits February 5, 2026 23:45
This commit adds support for tracking f41 PDP (Proof of Data Possession) deals
alongside legacy f05 market deals.

Changes:
- Add DealType field to Deal model (market vs pdp)
- Add PDP-specific fields: ProofSetID, ProofSetLive, NextChallengeEpoch
- Add migration to set deal_type='market' for existing deals
- Update deal tracker to set DealType when inserting market deals
- Add PDPTracker worker type and service stub
- Add pdp-tracker CLI command
- Add deal-type filter to deal list command

The PDPTracker service is a stub awaiting go-synapse integration (PR #2).
Once go-synapse is merged, the PDPClient interface will be implemented
to fetch proof set data from the PDPVerifier contract.

Part of: Filecoin Foundation contract milestone 1
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