FilOzone/pdp

Emit an event when pieces are scheduled for removal (schedulePieceDeletions)

Open

#281 aberto em 24 de jun. de 2026

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Solidity (16 forks)github user discovery
good first issue

Métricas do repositório

Stars
 (17 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

PDPVerifier.schedulePieceDeletions() marks pieces for removal and invokes the listener's piecesScheduledRemove callback, but emits no event. The FWSS callback is also silent: it charges the one-time fee, replenishes the lifecycle reserve, and queues metadata cleanup without emitting. A removal only becomes observable later, when PiecesRemoved fires during nextProvingPeriod processing.

It produces no log, so nothing log-driven sees it. Recovering a scheduled removal means reading contract storage, or scanning every transaction to the PDPVerifier address and decoding schedulePieceDeletions calldata. Neither is how event-driven indexers (foc-observer/Ponder, the PDP subgraph) work, so in practice the request is invisible to all of them until it's processed at the next proving boundary.

Proposed change

Emit an event in schedulePieceDeletions, mirroring the existing pattern:

event PiecesScheduledForRemoval(uint256 indexed setId, uint256[] pieceIds);

PiecesRemoved still fires at processing time, so the pair gives a full request -> process timeline.

Guia do colaborador