3131 ErrPDPVerifierDataSetNotLive abi.Error
3232 ErrPDPVerifierInsufficientChallengeDelay abi.Error
3333
34- // Removal-queue errors from FilOzone/pdp#297. These resolve against the
35- // hand-maintained ABI fragment in pdp/contract/removals.go until the
36- // generated PDPVerifier bindings carry them.
3734 ErrPDPVerifierPendingPieceDeletions abi.Error
3835 ErrPDPVerifierInvalidPieceDeletionBatch abi.Error
3936 ErrPDPVerifierEmptyRemovalBatch abi.Error
@@ -250,12 +247,6 @@ func IsProvingPeriodNotInitializedError(err error) bool {
250247
251248// IsNextProvingPeriodEmptyDatasetError returns true when PDPVerifier refuses to
252249// start the next proving period because the current proving set has no leaves.
253- //
254- // Both encodings are matched because one Curio build spans two contract
255- // versions: the condition is a string revert before FilOzone/pdp#297 and the
256- // NoPiecesToProve custom error afterwards. The underlying requirement --
257- // dataSetLeafCount > 0 -- is the same, so neither form can be dropped until no
258- // deployment runs the older contract.
259250func IsNextProvingPeriodEmptyDatasetError (err error ) bool {
260251 if err == nil {
261252 return false
@@ -267,7 +258,7 @@ func IsNextProvingPeriodEmptyDatasetError(err error) bool {
267258
268259// IsPendingPieceDeletionsError returns true when nextProvingPeriod (or initPP)
269260// refuses to roll over because the data set still has scheduled removals
270- // queued. This is recoverable: the drain task processes the queue and the
261+ // queued. This is recoverable: the process deletions task processes the queue and the
271262// proving-period task retries.
272263func IsPendingPieceDeletionsError (err error ) bool {
273264 if err == nil {
@@ -276,10 +267,6 @@ func IsPendingPieceDeletionsError(err error) bool {
276267 return strings .Contains (strings .ToLower (err .Error ()), contractErrorSelector (ErrPDPVerifierPendingPieceDeletions ))
277268}
278269
279- // IsStaleRemovalQueueViewError returns true when processPieceDeletions rejects
280- // the requested batch because Curio's view of the queue is out of date -- the
281- // queue shrank, or emptied, between the read and the send. Re-reading the queue
282- // and retrying is the correct response.
283270func IsStaleRemovalQueueViewError (err error ) bool {
284271 if err == nil {
285272 return false
@@ -289,19 +276,13 @@ func IsStaleRemovalQueueViewError(err error) bool {
289276 strings .Contains (errStr , contractErrorSelector (ErrPDPVerifierEmptyRemovalBatch ))
290277}
291278
292- // IsOnlyStorageProviderError returns true when PDPVerifier rejects a removal
293- // call because the sender is not the data set's storage provider. This needs
294- // operator attention rather than a retry.
295279func IsOnlyStorageProviderError (err error ) bool {
296280 if err == nil {
297281 return false
298282 }
299283 return strings .Contains (strings .ToLower (err .Error ()), contractErrorSelector (ErrPDPVerifierOnlyStorageProvider ))
300284}
301285
302- // IsPDPVerifierDataSetNotLive returns true when PDPVerifier reports that a data
303- // set is no longer live. In the removal pipeline this means the data set is
304- // being deleted or cleaned up, so its removal queue no longer matters.
305286func IsPDPVerifierDataSetNotLive (err error ) bool {
306287 if err == nil {
307288 return false
0 commit comments