Problem
handlePiecesAdded manually ABI-decodes the full transaction input (subgraph/src/pdp-verifier.ts:1032-1099): setId, tuple-array offset, length, and a per-piece struct offset via readUint256 (32-byte slice + reverse per word).
None of the decoded values are used for entity data — piece CID bytes come from event.params.pieceCids (pdp-verifier.ts:1103) and piece IDs from event.params.pieceIds. The decoded values only feed warning logs and a bounds check whose continue can wrongly skip creating a Root that the event params fully describe.
This is CPU burned per piece on the hottest backfill path, plus a correctness smell.
Proposal
- Delete the parsing block (
pdp-verifier.ts:1032-1099, keeping the loop body that builds Roots from event params) and the now-unused readUint256 helper (pdp-verifier.ts:1431-1446).
Acceptance criteria
Problem
handlePiecesAddedmanually ABI-decodes the full transaction input (subgraph/src/pdp-verifier.ts:1032-1099): setId, tuple-array offset, length, and a per-piece struct offset viareadUint256(32-byte slice + reverse per word).None of the decoded values are used for entity data — piece CID bytes come from
event.params.pieceCids(pdp-verifier.ts:1103) and piece IDs fromevent.params.pieceIds. The decoded values only feed warning logs and a bounds check whosecontinuecan wrongly skip creating a Root that the event params fully describe.This is CPU burned per piece on the hottest backfill path, plus a correctness smell.
Proposal
pdp-verifier.ts:1032-1099, keeping the loop body that builds Roots from event params) and the now-unusedreadUint256helper (pdp-verifier.ts:1431-1446).Acceptance criteria
handlePiecesAddedbuilds Roots purely from event params; no tx-input accessreadUint256removed (or confirmed still used elsewhere)