fix: add getScheduledRemovals method#464
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | c33240c | Commit Preview URL Branch Preview URL |
Dec 02 2025, 02:13 PM |
|
I don't think this is what you want - for one, by asking Curio to do it, it gets to update its own internal view of the data set without having to be surprised later on that something happened on chain. It should be able to handle both cases but it's much cleaner to first try and request the server to do it for us (and it doesn't cost us gas, plus we can use session keys for this too so we get to be entirely walletless if we want). The Curio handler actually does this immediately anyway, it doesn't do it in the background: https://github.com/filecoin-project/curio/blob/6814fede7b9612d12dff0899f4fa035ac1dde893/pdp/handlers.go#L889-L914 - the "schedule deletion" here is scheduling on chain. The problem is, that in WarmStorage, we don't actually do anything with
|
|
My bad, I did more digging and reminded myself of the fact that we don't store per-piece information in WarmStorage anyway, and we use The real problem you're experiencing in Filecoin Pin is this distance between the call to What you should do instead, if you want this information, is to call |
|
This won't work as is because |
|
So it sounds like the fix here to just remove the I am presuming we don't want a blanket "getScheduledRemovals" parallel to |
|
ok i tested this with some changes in filecoin-project/filecoin-pin#253 and there is still a delay, but it's working |
|
@hugomrdias @Kubuxu mind taking a peek when you get a chance? Fairly small changes here now. |
* fix: use pdpverifier contract for piece removal * chore: remove schedulePieceDeletions and revert integration * chore: attempt to lint:fix generated.ts * chore: remove generated.ts changes
fix: add getScheduledRemovals method
Problem
There was a data consistency issue when removing pieces from datasets:
This created confusing UX where calling deletePiece() then immediately querying the dataset would still show the piece without insight about it pending removal.
Solution
Consumers can call
getScheduledRemovalscontract method via pdpVerifierChanges
New PDPVerifier methods:
Benefits
getScheduledRemovalsOpen questions
Related Issues
Closes filecoin-project/curio#808
Related filecoin-project/filecoin-pin#253
Also see this slack thread if you have access