Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateState panics if client message is of type Misbehaviour #3636

Closed
3 tasks done
crodriguezvega opened this issue May 23, 2023 · 1 comment · Fixed by #6276
Closed
3 tasks done

UpdateState panics if client message is of type Misbehaviour #3636

crodriguezvega opened this issue May 23, 2023 · 1 comment · Fixed by #6276
Assignees
Labels
07-tendermint type: bug Something isn't working as expected
Milestone

Comments

@crodriguezvega
Copy link
Contributor

Many thanks to @plafer for finding this bug.

Summary of Bug

It is possible for CheckForMisbehaviour to return false for a client message of type Misbehaviour, and if this happens, then UpdateState will panic.

Expected Behaviour

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
@crodriguezvega crodriguezvega added type: bug Something isn't working as expected help wanted Issues for which we would appreciate help/support from the community 02-client labels May 23, 2023
@colin-axner colin-axner added the needs discussion Issues that need discussion before they can be worked on label May 23, 2023
@crodriguezvega crodriguezvega added 07-tendermint and removed help wanted Issues for which we would appreciate help/support from the community 02-client labels May 24, 2023
@crodriguezvega crodriguezvega added this to the v9.0.0 milestone Mar 25, 2024
@colin-axner colin-axner removed the needs discussion Issues that need discussion before they can be worked on label May 8, 2024
@colin-axner
Copy link
Contributor

Required for #6232

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
07-tendermint type: bug Something isn't working as expected
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

3 participants