Function: respondToZKMLChallenge(address _validator, string _ipfsResponse)
This allows responding to a ZKML challenge.
Inputs
_validatorControl: Fully controlled by the caller.
Constraints: Checked that the validator is registered.
Impact: The validator that gave the challenge.
_ipfsResponseControl: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the response.
Branches and code coverage
Intended branches
Assure that the
_validatoractually challenged the caller with the specificipfsChallenge. Currently not performed.Update the
zc.ipfsResponseof theZKMLChallengesmapping for the modeler. Currently not performed as memory is used instead of storage.Assumed that the challenge was given for this contract's specific competition. Currently not explicitly checked.
Assure that the
_validatorhas been registered.
Negative behavior
Should not reuse a response that has already been used. Currently not checked.
Should not allow overriding a response to a challenge. Currently not checked.
Should not allow calling this while the contract is paused.
Should not allow a
msg.senderthat has not registered as a modeler to respond to a challenge.