ibc
ibc copied to clipboard
ICS2: `ClientState.verifyClientMessage` should return a boolean
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.
In ibc-go we actually return an error. For 07-tendermint the implementation looks like this.
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.