Skip to content

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

Description

@rvagg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status
    Status
    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions