proveth icon indicating copy to clipboard operation
proveth copied to clipboard

Handling invalid proofs

Open lorenzb opened this issue 6 years ago • 2 comments

On receiving an invalid proof, theProvethVerifier contract currently:

  • either reverts
  • or doesn't revert and notifies the caller that the proof wasn't valid.

It should be either one or the other.

lorenzb avatar Jul 30 '18 16:07 lorenzb

Well, according to the solidity documentation,

"Catching exceptions is not yet possible."

so maybe that influences this decision, personally I think reverting is saner, but if the EVM doesn't support catching exceptions then that leaves a developer with no real way of doing anything other than bubbling up and reverting as well, if a MPP fails

relyt29 avatar Aug 13 '18 19:08 relyt29

Agreed, let's revert.

We could handle exceptions with a low-level solidity "exception handler" that catches reverts and returns invalid instead.

lorenzb avatar Aug 24 '18 11:08 lorenzb