Function: respondToZKMLChallenge(address _validator, string _ipfsResponse)
This allows responding to a ZKML challenge.
Inputs
_validator
Control: Fully controlled by the caller.
Constraints: Checked that the validator is registered.
Impact: The validator that gave the challenge.
_ipfsResponse
Control: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the response.
Branches and code coverage
Intended branches
Assure that the
_validator
actually challenged the caller with the specificipfsChallenge
. Currently not performed.Update the
zc.ipfsResponse
of theZKMLChallenges
mapping 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
_validator
has 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.sender
that has not registered as a modeler to respond to a challenge.