Skip to content

data-set commands gate on getActivePieceCount, which reverts out-of-gas on larger sets, making them uninspectable and unterminable #691

Description

@TippyFlitsUK

Version: filecoin-pin 1.3.0, mainnet, PDPVerifier 0xBADd0B92C1c71d02E7d520f64c0876538fa2557F.

data-set show, data-set ls and the terminate pre-flight all call getActivePieceCount(setId). On larger data sets this view reverts out of gas:

Error: The contract function "getActivePieceCount" reverted
vm error: 00: f03677600 (method 3844450837) -- contract reverted at 75 (33)
          01: f03677600 (method 6) -- out of gas (7)

Measured on one account's sets: 3,452 and 6,882 pieces inspect fine; 18,807 and 29,608 pieces revert. Effects:

  1. data-set ls fails for the entire account as soon as one set crosses the threshold.
  2. data-set show <id> fails for any such set.
  3. data-set terminate <id> fails for any such set, and worse, reports a misleading error: dist/data-set/run.js wraps getDetailedDataSet in a catch that maps any error to "Could not find data set with ID X", so the revert surfaces as "not found".

Net effect: the larger a data set grows, the less able its owner is to see or terminate it through the CLI. Termination does not need a piece count at all, and the provider-relayed termination path avoids the call entirely. (This is the same view-level OOG family previously seen with getActivePieces/getActivePieceCount on million-piece sets, where cursor-based paging via getActivePiecesByCursor was the workaround - it just bites much earlier than expected, somewhere between ~7k and ~19k pieces.)

Suggested directions: drop the piece-count pre-flight from terminate, make it non-fatal in show/ls (display "unavailable" instead of failing the command), and surface the real error instead of "not found".

Metadata

Metadata

Assignees

No one assigned

    Labels

    team/filecoin-pin"Filecoin Pin" project is a stakeholder for this work.team/fs-wgFOC working group is a stakeholder for this work, and thus wants to track it on their project board.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions