You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we squeeze as many IBC checks into msg.ValidateBasic as possible. Sometimes we duplicate this logic in the handler, sometimes we don't.
In order to ensure the handler are secure without accepting a msg as an argument, we can either, keep maximizing msg.ValidateBasic to save transaction gas and duplicate all the necessary checks or we can move all necessary IBC logic out of message ValidateBasic and into core IBC.
Historically IBC is designed to be as minimal and defensive as possible. I'm slightly in favor of removing all core IBC logic from msg.ValidateBasic() and into the handlers. I'm fine with leaving clientState.Validate, misbehaviour.ValidateBasic etc checks in msg.ValidateBasic (and duplicating these) but other checks which are less readable and more specific should be de-duplicated, such as this check
At the very least, I'd like an ADR to be decided upon and implemented such that we can have a clear understanding of what checks are needed where. I do not want to be adding defensive checks in some handlers and not in others because we may or may not have use cases for some and not others. We should be consistent across the board, we should intentionally decide upon some design
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged/assigned
The text was updated successfully, but these errors were encountered:
Summary
see previous discussion
Currently we squeeze as many IBC checks into
msg.ValidateBasic
as possible. Sometimes we duplicate this logic in the handler, sometimes we don't.In order to ensure the handler are secure without accepting a
msg
as an argument, we can either, keep maximizingmsg.ValidateBasic
to save transaction gas and duplicate all the necessary checks or we can move all necessary IBC logic out of messageValidateBasic
and into core IBC.Historically IBC is designed to be as minimal and defensive as possible. I'm slightly in favor of removing all core IBC logic from
msg.ValidateBasic()
and into the handlers. I'm fine with leavingclientState.Validate
,misbehaviour.ValidateBasic
etc checks inmsg.ValidateBasic
(and duplicating these) but other checks which are less readable and more specific should be de-duplicated, such as this checkAt the very least, I'd like an ADR to be decided upon and implemented such that we can have a clear understanding of what checks are needed where. I do not want to be adding defensive checks in some handlers and not in others because we may or may not have use cases for some and not others. We should be consistent across the board, we should intentionally decide upon some design
For Admin Use
The text was updated successfully, but these errors were encountered: