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

remove AllowUpdateAfterMisbehaviour/AllowUpdateAfterExpiry from 07-te… #5855

Conversation

expertdicer
Copy link
Contributor

@expertdicer expertdicer commented Feb 19, 2024

…ndermint client state

Description

closes: #5750

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Summary by CodeRabbit

  • Refactor

    • Deprecated and removed the AllowUpdateAfterMisbehaviour and AllowUpdateAfterExpiry flags from the client state configuration.
  • Chores

    • Updated protocol definitions to reflect the deprecation of certain fields, ensuring future compatibility and cleaner codebase.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1c0c756) 81.59% compared to head (6bee6cf) 81.59%.
Report is 32 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             main    #5855     +/-   ##
=========================================
  Coverage   81.59%   81.59%             
=========================================
  Files         199      198      -1     
  Lines       15167    12099   -3068     
=========================================
- Hits        12375     9872   -2503     
+ Misses       2326     1765    -561     
+ Partials      466      462      -4     
Files Coverage Δ
...les/light-clients/07-tendermint/proposal_handle.go 77.14% <ø> (-2.52%) ⬇️

... and 171 files with indirect coverage changes

@expertdicer expertdicer marked this pull request as draft February 19, 2024 06:17
@expertdicer expertdicer marked this pull request as ready for review February 19, 2024 06:46
@colin-axner colin-axner requested a review from chatton as a code owner May 21, 2024 14:44
Copy link
Contributor

coderabbitai bot commented May 21, 2024

Walkthrough

Walkthrough

The changes involve the removal of deprecated fields AllowUpdateAfterMisbehaviour and AllowUpdateAfterExpiry from the 07-tendermint client state in the IBC module. This includes modifying test files to stop assigning these fields, updating the IsMatchingClientState function to exclude these settings, and marking these fields as reserved in the protobuf definition.

Changes

Files Change Summary
modules/core/02-client/proposal_handler_test.go Removed assignments to AllowUpdateAfterMisbehaviour in tmClientState for subjectClientState and substituteClientState in TestNewClientUpdateProposalHandler.
modules/light-clients/07-tendermint/proposal_handle.go Removed the setting of AllowUpdateAfterExpiry and AllowUpdateAfterMisbehaviour to true in the IsMatchingClientState function.
proto/ibc/lightclients/tendermint/v1/tendermint.proto Deprecated allow_update_after_expiry and allow_update_after_misbehaviour fields and replaced them with a reserved range from 10 to 11.

Assessment against linked issues

Objective (Issue #5750) Addressed Explanation
Remove AllowUpdateAfterMisbehaviour from client state
Remove AllowUpdateAfterExpiry from client state
Update tests to reflect the removal of deprecated fields
Reserve the protobuf fields previously used by deprecated fields

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 074d341 and 3aca8ed.
Files ignored due to path filters (1)
  • modules/light-clients/07-tendermint/tendermint.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (3)
  • modules/core/02-client/proposal_handler_test.go (1 hunks)
  • modules/light-clients/07-tendermint/proposal_handle.go (1 hunks)
  • proto/ibc/lightclients/tendermint/v1/tendermint.proto (1 hunks)
Files skipped from review due to trivial changes (2)
  • modules/light-clients/07-tendermint/proposal_handle.go
  • proto/ibc/lightclients/tendermint/v1/tendermint.proto
Additional Context Used
Path-based Instructions (1)
modules/core/02-client/proposal_handler_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

Additional comments not posted (3)
modules/core/02-client/proposal_handler_test.go (3)

Line range hint 1-1: The test suite structure and setup are well-organized and adhere to best practices.


Line range hint 1-1: The removal of deprecated fields is correctly implemented and does not affect the test logic.


Line range hint 1-1: The test cases are comprehensive and correctly test the client update proposal functionality.

@colin-axner
Copy link
Contributor

Thanks @expertdicer for your contribution! We decided to wait on these changes for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove AllowUpdateAfterMisbehaviour/AllowUpdateAfterExpiry from 07-tendermint client state.
3 participants