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

fix(ibc-clients/tendermint): disallow empty proof-specs and empty depth range in proof-specs #1104

Merged

Conversation

gr4yha7
Copy link
Contributor

@gr4yha7 gr4yha7 commented Feb 28, 2024

Closes: #1100


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).

@gr4yha7 gr4yha7 marked this pull request as draft February 28, 2024 23:04
@gr4yha7 gr4yha7 marked this pull request as ready for review February 29, 2024 01:19
@rnbguy
Copy link
Collaborator

rnbguy commented Feb 29, 2024

Thanks @gr4yha7 ! Can you please add some unit tests to the new validate() method?

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.56%. Comparing base (6dd3c64) to head (8816158).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1104      +/-   ##
==========================================
+ Coverage   66.52%   66.56%   +0.04%     
==========================================
  Files         208      208              
  Lines       20705    20733      +28     
==========================================
+ Hits        13773    13801      +28     
  Misses       6932     6932              

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

@rnbguy rnbguy changed the title fix: disallow empty proof-specs and empty depth range in proof-specs fix(ibc-clients/tendermint): disallow empty proof-specs and empty depth range in proof-specs Feb 29, 2024
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.

You may have noticed, just highlighting that there's an implicit check as part of ICS23 here. Though, I'm still in favor of adding an explicit check in ibc-rs to prevent the creation of faulty clients.
All good, thank you both. Just requested a small fix!

ibc-core/ics23-commitment/types/src/error.rs Outdated Show resolved Hide resolved
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.

🙏

@rnbguy rnbguy merged commit 65d8446 into cosmos:main Mar 1, 2024
14 checks passed
@rnbguy
Copy link
Collaborator

rnbguy commented Mar 1, 2024

Thanks @gr4yha7 🙏 nice work ✨

@gr4yha7
Copy link
Contributor Author

gr4yha7 commented Mar 2, 2024

Thanks @gr4yha7 🙏 nice work ✨

Thanks for the assistance @rnbguy

Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
…th range in proof-specs (#1104)

* fix: disallow empty proof-specs and empty depth range in proof-specs

* chore: add changelog entry

* nits

* test: add unit test

* chore: use default option (none)

* avoid new var

* nit in changelog

* rm redundant clone

* propagate errors

* proof depth is unsigned

* use impl method

---------

Co-authored-by: Ranadeep Biswas <mail@rnbguy.at>
Co-authored-by: Rano | Ranadeep <ranadeep@informal.systems>
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.

bug(ibc-clients/tendermint): sanity check for proof_specs are skipped
3 participants