Assessment reports>Spectral Modelers>Threat Model>giveChallengeToModeler

Function: giveChallengeToModeler(string _ipfsChallenge, address _modeler, DataTypes.DrandProof _proof)

Facilitates challenging a modeler.

Inputs

  • _ipfsChallenge

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The IPFS of the challenge.

  • _modeler

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The modeler to be challenged.

  • _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

  • Assure that the modeler is registered. Currently not performed.

  • Should reset the ipfsResponse of the modeler. Currently not performed.

  • Map the ipfsChallenge between a validator and a modeler. Currently not performed.

  • Assure that the proof is valid for the challenged modeler. Currently not performed.

  • Assumed that the challenge is given for this contract's specific competition. Currently not explicitly checked.

  • Set the ipfsChallenge of the modelerChallenges mapping for the modeler.

Negative behavior

  • Should not be able to challenge a modeler that has opted out.

  • Should not be able to challenge a modeler that has already been challenged.

  • Should not allow a proof that has already been submitted. Currently not checked.

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

Zellic © 2024Back to top ↑