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
UpdateState does not panic if client message is of type Misbehaviour.
Version
v7.0.0
Steps to Reproduce
Submit an MsgUpdateClient where ClientMessage is of type Misbehaviour and contains two valid headers (e.g. two headers where Header1 has a higher height and later timestamp than Header2).
Proposed Solution
If the client message received by UpdateState if of type Misbehaviour then no-op (return []exported.Height{}). This solution is preferred at this moment because it is not API breaking.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged/assigned
The text was updated successfully, but these errors were encountered:
The logic is: if a user submits a valid client message using the misbehaviour type (two headers) which is not actually misbehaviour, then there are no updates to perform (noop)
Many thanks to @plafer for finding this bug.
Summary of Bug
It is possible for
CheckForMisbehaviour
to return false for a client message of typeMisbehaviour
, and if this happens, thenUpdateState
will panic.Expected Behaviour
UpdateState
does not panic if client message is of typeMisbehaviour
.Version
v7.0.0
Steps to Reproduce
Submit an
MsgUpdateClient
whereClientMessage
is of typeMisbehaviour
and contains two valid headers (e.g. two headers whereHeader1
has a higher height and later timestamp thanHeader2
).Proposed Solution
If the client message received by
UpdateState
if of typeMisbehaviour
then no-op (return[]exported.Height{}
). This solution is preferred at this moment because it is not API breaking.For Admin Use
The text was updated successfully, but these errors were encountered: