Assessment reports>Spectral Modelers>Threat Model>updateModel

Function: updateModel(string _modelCommitment)

This facilitates the update of a modeler.

Inputs

  • _modelCommitment

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The new model commitment of the modeler.

Branches and code coverage

Intended branches

  • Reset the ipfsResponse of the modeler. Currently not performed.

  • Assume that the competition is still ongoing. Currently not explicitly checked.

  • Assume that the _modelCommitment is different than the previous one. Currently not checked.

  • Assume that the _modelCommitment is unique. Currently not checked.

  • Update the modelers mapping for the modeler.

  • Update the modelerChallenges mapping for the modeler.

Negative behavior

  • Should not call modelers[msg.sender].medianPerformanceResults = 0; once again, as that is set to 0 a few lines above.

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

  • Should not allow a topNModeler to update their model.

  • Should not allow a modeler to update their model if they are not registered.

Zellic © 2024Back to top ↑