lorenzb / proveth

Generate & verify Merkle-Patricia-proofs for Ethereum
Other
106 stars 7 forks source link

Handling invalid proofs #9

Open lorenzb opened 6 years ago

lorenzb commented 6 years ago

On receiving an invalid proof, theProvethVerifier contract currently:

It should be either one or the other.

relyt29 commented 6 years ago

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

lorenzb commented 6 years ago

Agreed, let's revert.

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