Assessment reports>Spectral Modelers>Threat Model>ZKMLChallengeModeler

Function: ZKMLChallengeModeler(address modeler, string _ipfsChallenge, DataTypes.DrandProof _proof)

This allows ZKML challenging a modeler.

Inputs

  • modeler

    • Control: Fully controlled by the caller.

    • Constraints: Checked that the modeler has a proper futureRandSlots mapping.

    • Impact: The modeler to be challenged.

  • _ipfsChallenge

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The IPFS of the challenge.

  • _proof

    • Control: Fully controlled by the caller.

    • Constraints: Checked that the round of the proof matches the futureRandSlots mapping.

    • Impact: The proof for the specific round.

Branches and code coverage

Intended branches

  • Should assure that the proof is valid for the modeler. Currently not performed.

  • Update the ZKMLChallenges mapping for the modeler by setting the ipfsChallenge to the _ipfsChallenge.

  • Assure that the round of the proof matches the futureRandSlots mapping.

Negative behavior

  • Should not allow challenging the modeler if they have already been challenged (overriding the current challenge).

  • Should not allow calling this while the contract is paused.

Zellic © 2024Back to top ↑