Skip to content

pdpv0: user initiated termination#1246

Merged
LexLuthr merged 4 commits into
feature/pdp-user-terminationfrom
pdpv0-client-termination
May 27, 2026
Merged

pdpv0: user initiated termination#1246
LexLuthr merged 4 commits into
feature/pdp-user-terminationfrom
pdpv0-client-termination

Conversation

@LexLuthr

@LexLuthr LexLuthr commented May 22, 2026

Copy link
Copy Markdown
Collaborator

fixes #1235

Summary

Adds pdpv0 client-requested data set termination flow.
• Adds POST /pdp/data-sets/{id}/terminate to queue client termination with required non-empty extraData.
• Adds GET /pdp/data-sets/{id}/terminate for client termination status, including tx hash/status/success, FWSS termination confirmation, and service termination epoch.
• Tracks client-requested termination state in pdp_delete_data_set.
• Makes terminate retry/failure handling origin-aware:
◦ client failed txs are deleted so clients can retry
◦ provider/internal failed txs are reset for internal retry
◦ failed txs that already terminated FWSS still advance the pipeline
• Adds chain-sync reconciliation for missing termination message-wait rows using FWSS state.
• Adds immediate settlement task for client-requested terminations and marks settlement transactions with a reason so pay watcher can distinguish them.
• Adds race documentation for client termination/immediate settlement interactions.

Notes

FWSS ABI changes are still pending. Current ABI TODOs remain in TerminateFWSSTask and should be resolved when terminateService(uint256,bytes) is available.
ABI has been regenerated for FWSS based on FilOzone/filecoin-services#485

@LexLuthr LexLuthr requested review from a team and ZenGround0 as code owners May 22, 2026 15:37
@FilOzzy FilOzzy added the team/fs-wg Items being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10 label May 22, 2026
@FilOzzy FilOzzy added this to FOC May 22, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 22, 2026
@LexLuthr LexLuthr force-pushed the pdpv0-client-termination branch from f15eeba to df64fc3 Compare May 22, 2026 15:40
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC May 22, 2026
@LexLuthr LexLuthr force-pushed the pdpv0-client-termination branch from df64fc3 to 5210039 Compare May 25, 2026 11:11
Base automatically changed from fix/deletions to feature/pdp-user-termination May 25, 2026 14:13
@LexLuthr LexLuthr force-pushed the pdpv0-client-termination branch from 12f5bd6 to 15be2a1 Compare May 25, 2026 14:33
@LexLuthr LexLuthr linked an issue May 25, 2026 that may be closed by this pull request

@ZenGround0 ZenGround0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is a really nice feature cleaning up as you go along. The only thing I block on is including the immediate settle task which I view as well crafted but wholly unnecessary. If you want to argue about keeping that please do but hold off on merge. Everything is uncontroversial or not important enough to block

Comment thread tasks/pay/watcher.go Outdated
Comment thread tasks/pay/watcher.go Outdated
Comment thread tasks/pdpv0/watch_fwss_terminate.go Outdated
Comment thread tasks/pdpv0/task_chain_sync.go
Comment thread pdp/handlers_terminate.go
Comment thread tasks/pay/immediate_settle_task.go Outdated
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC May 26, 2026
Comment thread tasks/pay/immediate_settle_task.go Outdated

@ZenGround0 ZenGround0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy enough with this that you should not consider me blocking. I have some questions on small details that don't matter too much. And a strong suggestions around avoiding immediate settle task right now at least until we get a strong reason for including this that you buy into from @rvagg.

@ZenGround0

ZenGround0 commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Oh yeah also wrote down the fwss contract upgrade dependency in #1260. We'll want a little patch for keeping things working independent of upgrade / no upgrade before merge to main.

@LexLuthr LexLuthr force-pushed the pdpv0-client-termination branch from 59b198d to c8670b1 Compare May 27, 2026 12:49
@LexLuthr

Copy link
Copy Markdown
Collaborator Author

@ZenGround0 I have addressed your review in last commit. I am merging this into the feature branch. Feel free to one more pass if you wish. I can address them in a separate follow up PR.

@LexLuthr LexLuthr merged commit a010b30 into feature/pdp-user-termination May 27, 2026
31 checks passed
@LexLuthr LexLuthr deleted the pdpv0-client-termination branch May 27, 2026 13:08
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC May 27, 2026
@LexLuthr LexLuthr restored the pdpv0-client-termination branch May 27, 2026 13:10
LexLuthr added a commit that referenced this pull request May 27, 2026
* user initated termination

* regenerate FWSS abi

* drop indexes

* remove client settle task
LexLuthr added a commit that referenced this pull request May 27, 2026
* user initated termination

* regenerate FWSS abi

* drop indexes

* remove client settle task
@LexLuthr LexLuthr deleted the pdpv0-client-termination branch May 27, 2026 13:16
ZenGround0 added a commit that referenced this pull request Jun 2, 2026
* fix: pdpv0 deletion pipeline (#1239)

* fix deletion pipeline

* apply suggestions

* fmt

* pdpv0: user initiated termination (#1246)

* user initated termination

* regenerate FWSS abi

* drop indexes

* remove client settle task

* pdpv0: handle PDPVerifier piece cleanup before local deletion (#1253)

* dataSet piece cleanup

* Pay CleanupFee (#1254)

* add gc indexes

* address review

* apply suggestions

* FWSS version gate for client-requested PDPv0 termination (#1261)

* FWSS version based terminate

* use semvers

---------

Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com>

---------

Co-authored-by: LexLuthr <88259624+LexLuthr@users.noreply.github.com>
Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDP: Implement pdpv0 client termination endpoint

5 participants