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.
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:
POST /pdp/data-sets/{id}/terminate.pdp/handlers.go(currentlyhandleDeleteDataSet).extraDatafor client-requested termination.extraDatathrough unchanged; FWSS/PDPVerifier remains authoritative for verifying the client signature.extraDatashould remain an internal/provider termination path only, not accepted as a successful client termination request.201 Created/similar with aLocationheader carrying the tx hash, matching create/addPieces style.GET /pdp/data-sets/{id}/terminated/{txHash}.