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

Implement consensus state pruning for Tendermint clients #922

Merged
merged 23 commits into from
Oct 19, 2023

Conversation

seanchen1991
Copy link
Contributor

Closes: #600

Description

Implements consensus state pruning for Tendermint clients.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@27592c4). Click here to learn what that means.

❗ Current head 9fe77f4 differs from pull request most recent head 52ea3ef. Consider uploading reports for the commit 52ea3ef to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #922   +/-   ##
=======================================
  Coverage        ?   67.65%           
=======================================
  Files           ?      130           
  Lines           ?    16415           
  Branches        ?        0           
=======================================
  Hits            ?    11105           
  Misses          ?     5310           
  Partials        ?        0           
Files Coverage Δ
...ibc/src/core/ics02_client/handler/update_client.rs 95.41% <100.00%> (ø)
crates/ibc/src/mock/context/clients.rs 87.13% <98.38%> (ø)
...nts/ics07_tendermint/client_state/update_client.rs 79.69% <94.11%> (ø)
...s/ibc/src/clients/ics07_tendermint/client_state.rs 74.31% <71.42%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Farhad-Shabani Farhad-Shabani left a comment

Choose a reason for hiding this comment

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

All set from my end. See if the added unit test makes sense to you, we can merge. 🎉
Thanks @seanchen1991 for taking care of this!

@Farhad-Shabani Farhad-Shabani added this to the v0.47.0 milestone Oct 19, 2023
@Farhad-Shabani Farhad-Shabani merged commit d062728 into main Oct 19, 2023
1 of 10 checks passed
@Farhad-Shabani Farhad-Shabani deleted the sean/consensus-state-pruning branch October 19, 2023 19:42
Farhad-Shabani added a commit that referenced this pull request Sep 9, 2024
* Add prune_oldest_consensus_state to ClientStateValidation

* Add consensus_state_heights fn signature to CommonContext

* Stub prune_oldest_consensus_state fn

* Add comments for delete_update_time and delete_update_height

* Clean up code structure a bit

* Fix some compilation errors

* Address all compilation errors resulting from prune_old_consensus_states

* Move delete_update_height and delete_update_time methods to ExecutionContext trait

* Clean up all compilation errors

* Disambiguate some method calls

* Fix fn formatting

* Run cargo fmt

* Flip consensus state condition check

* Add changelog entry

* Incorporate PR feedback

* test: add test_cons_state_pruning

* Simplify consensus state pruning unit test a bit

* Document `test_consensus_state_pruning` function

* Correct a detail in documentation

---------

Co-authored-by: Farhad Shabani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Tendermint light client: add consensus state pruning on client update
2 participants