ibc icon indicating copy to clipboard operation
ibc copied to clipboard

ICS2: `ClientState.verifyClientMessage` should return a boolean

Open plafer opened this issue 2 years ago • 1 comments

Is there a reason why ClientState.verifyClientMessage() throws an exception as opposed to returning a boolean? I would have expected it to return a boolean and be called inside a abortTransactionUnless() in the handlers. For me, it interrupts the flow to remember that this function works differently from the other verification functions in the spec.

Also as a nit, ICS-2 mentions that verifyClientMessage() is a validity predicate (function which returns a boolean), which is inconsistent with the current signature.

plafer avatar Sep 09 '22 17:09 plafer

In ibc-go we actually return an error. For 07-tendermint the implementation looks like this.

crodriguezvega avatar Sep 10 '22 20:09 crodriguezvega

I discussed with @AdityaSripal and he thinks that it's better to not switch to a boolean return type, so we will leave it as is.

crodriguezvega avatar Feb 07 '23 09:02 crodriguezvega