Assessment reports>Proof of Data Possession>Threat Model>nextProvingPeriod

Function: nextProvingPeriod(uint256 proofSetId, uint256 challengeEpoch, uint256, bytes)

This function can be called by the trusted PDPVerifier contract to set the next proving period. As a result, if a proof has not been provided for the current period, the current period will be counted as skipped.

Inputs

  • proofSetId

    • Control: Full control.

    • Constraints: No constraints.

    • Impact: The identifier of the proof set.

  • challengeEpoch

    • Control: Full control.

    • Constraints: challengeEpoch must be within the next challengeWindow.

    • Impact: PDPVerifier sets the desired challengeEpoch, and nextProvingPeriod ensures that this epoch falls within the next challengeWindow.

Branches and code coverage

Intended branches

  • If the current provingDeadlines[proofSetId] is zero, the first deadline is calculated as expected.

  • If the current provingDeadlines[proofSetId] is not zero, the next deadline is calculated as expected.

  • If several periods have been skipped, the next deadline is calculated as expected.

  • provenThisPeriod[proofSetId] is reset to false.

  • If faultPeriods is not zero, the FaultRecord event is emitted.

  • If challengeEpoch is zero, provingDeadlines[proofSetId] is set to zero.

Negative behavior

  • The provided challengeEpoch is outside the challengeWindow.

  • The provided challengeEpoch is greater than firstDeadline.

  • block.number is less than the previous deadline.

  • The caller is not a trusted PDPVerifier.

Zellic © 2025Back to top ↑