Skip to content

PDP: Implement pdpv0 client termination endpoint #1235

@rvagg

Description

@rvagg

Replaces #1028

Ref: https://www.notion.so/filecoindev/Data-Set-Terminations-Clean-up-360dc41950c1801ebf0aff017a322e7f

Curio currently has a data set delete route stub in pdp/handlers.go, but this should become client-requested termination, not direct deletion. Deletion is an internal Curio/PDP cleanup operation after service termination and payment finalisation.

Scope:

  • Add a client-facing terminate endpoint for pdpv0 data sets, POST /pdp/data-sets/{id}/terminate.
  • Implement/replace the existing handler stub path in pdp/handlers.go (currently handleDeleteDataSet).
  • Verify the data set exists and belongs to the requesting service.
  • Require non-empty extraData for client-requested termination.
  • No needt to validate EIP-712 in Curio. Pass extraData through unchanged; FWSS/PDPVerifier remains authoritative for verifying the client signature.
  • Empty extraData should remain an internal/provider termination path only, not accepted as a successful client termination request.
  • Submit the FWSS termination transaction via the existing pdpv0 termination path and return the transaction hash, matching other PDP endpoints that submit transactions.
  • Return 201 Created/similar with a Location header carrying the tx hash, matching create/addPieces style.
  • Add a termination status endpoint, e.g. GET /pdp/data-sets/{id}/terminated/{txHash}.
  • The status endpoint should report tx status/success, whether FWSS termination has been confirmed, and the service termination epoch when known.
  • Make repeated calls idempotent while termination is already pending or complete.

Metadata

Metadata

Assignees

Labels

team/fs-wgItems being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10

Type

No type
No fields configured for issues without a type.

Projects

Status

🐱 Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions