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

[ICS07] Header/Misbehaviour verification methods are not quite reusable #1149

Closed
Tracked by #116 ...
Farhad-Shabani opened this issue Apr 2, 2024 · 0 comments · Fixed by #1150
Closed
Tracked by #116 ...

[ICS07] Header/Misbehaviour verification methods are not quite reusable #1149

Farhad-Shabani opened this issue Apr 2, 2024 · 0 comments · Fixed by #1150
Assignees
Labels
O: usability Objective: aims to enhance user experience (UX) and streamline product usability
Milestone

Comments

@Farhad-Shabani
Copy link
Member

Improvement Summary

Currently, some functions/methods handling ICS07 Header/Misbehaviour verification are closely tied to specific Tendermint's ClientState and ConsensusState types. However, these functions could be made more versatile to benefit other structures resembling ICS07 without requiring all their fields. These methods include:

  • check_trusted_next_validator_set
  • as_trusted_block_state
  • verify_misbehaviour_header
  • check_for_misbehaviour_on_misbehavior
  • check_trusted_next_validator_set

Proposal

Typically, these methods don't need the entire object (all fields) of the ClientState and ConsensusState. The idea is to flatten the arguments of these functions by passing only the essential information they require. This approach allows us to work with different types of ClientState that share similar verification logic. This need became apparent while implementing the verify_client_message and check_misbehavior methods for the Sovereign light client in the sovereign-ibc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: usability Objective: aims to enhance user experience (UX) and streamline product usability
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant