feat: emit PiecesScheduledForRemoval when scheduling piece deletions - #287
Conversation
Make scheduled deletions observable to event-driven indexers before nextProvingPeriod processes removals.
| scheduledRemovals[setId].push(pieceId); | ||
| } | ||
|
|
||
| emit PiecesScheduledForRemoval(setId, pieceIds); |
There was a problem hiding this comment.
emit after listener instead of before, in case listener rejects
|
Addressed in 8aba46b — emit now happens after the listener call, matching the other listener/emit sequences in |
|
thanks @nishant-uxs, this is going to need an abi update, |
|
Thanks @rvagg — addressed.
FilOzone/filecoin-services#566 Once this PR merges, we can bump |
Summary
PiecesScheduledForRemoval(setId, pieceIds)fromschedulePieceDeletionsso indexers can observe scheduled removals immediately, without waiting forPiecesRemovedat the next proving boundary.IPDPEventsalongside the existing piece lifecycle events.Closes #281
Files Changed
src/interfaces/IPDPEvents.solsrc/PDPVerifier.soltest/PDPVerifier.t.solTesting Performed
forge build --via-irforge test --via-ir(187 passed)Known Limitations
piecesScheduledRemovebehavior; event is for log-driven consumers.Risk Assessment