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: use Binary for checksum and merkle path so base64 deser works #1283

Merged
merged 10 commits into from
Jul 19, 2024

Conversation

Farhad-Shabani
Copy link
Member

@Farhad-Shabani Farhad-Shabani commented Jul 17, 2024

With this PR:

  • Removed the cosmwasm feature for a better consistency with feature flags across ibc-rs, leveraging existing serde and schema features.
  • Introduced a few helpers methods for the PathBytes and CommitmentPrefix construction.

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

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 16 lines in your changes missing coverage. Please review.

Project coverage is 67.45%. Comparing base (e36015c) to head (b4a198b).
Report is 1 commits behind head on main.

Files Patch % Lines
ibc-core/ics23-commitment/types/src/commitment.rs 0.00% 5 Missing ⚠️
ibc-core/ics24-host/types/src/path.rs 0.00% 5 Missing ⚠️
ibc-clients/cw-context/src/types/msgs.rs 92.30% 2 Missing ⚠️
ibc-clients/ics08-wasm/types/src/client_state.rs 0.00% 2 Missing ⚠️
...bc-clients/ics08-wasm/types/src/consensus_state.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1283      +/-   ##
==========================================
+ Coverage   67.43%   67.45%   +0.02%     
==========================================
  Files         236      236              
  Lines       23940    23968      +28     
==========================================
+ Hits        16144    16168      +24     
- Misses       7796     7800       +4     

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

@Farhad-Shabani Farhad-Shabani requested a review from rnbguy July 17, 2024 16:56
@Farhad-Shabani Farhad-Shabani added this to the 0.54.0 milestone Jul 17, 2024
@Farhad-Shabani Farhad-Shabani marked this pull request as ready for review July 17, 2024 17:24
@Farhad-Shabani Farhad-Shabani changed the title fix: serialize 08-wasm checksum with hex fix: revert checksum types to Binray so base64 deser works Jul 18, 2024
@Farhad-Shabani Farhad-Shabani changed the title fix: revert checksum types to Binray so base64 deser works fix: revert checksum and MerklePath to use Binray so base64 deser works Jul 19, 2024
@Farhad-Shabani Farhad-Shabani changed the title fix: revert checksum and MerklePath to use Binray so base64 deser works fix: use Binary for checksum and merkle path so base64 deser works Jul 19, 2024
@rnbguy rnbguy force-pushed the farhad/serialize-checksum-with-hex branch from 6547980 to f8444e4 Compare July 19, 2024 06:47
@rnbguy rnbguy force-pushed the farhad/serialize-checksum-with-hex branch from f8444e4 to 8f4661b Compare July 19, 2024 06:49
Copy link
Collaborator

@rnbguy rnbguy left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Thanks !

I added two tests. Please take a look before merging 🙂

@Farhad-Shabani
Copy link
Member Author

Great! Thank you for the tests, Rano!

@Farhad-Shabani Farhad-Shabani added this pull request to the merge queue Jul 19, 2024
Merged via the queue into main with commit 39c34ab Jul 19, 2024
19 checks passed
@Farhad-Shabani Farhad-Shabani deleted the farhad/serialize-checksum-with-hex branch July 19, 2024 20:35
Farhad-Shabani added a commit that referenced this pull request Sep 9, 2024
…1283)

* fix: de/serialize checksum with hex

* imp: remove unnecessary cosmwasm feature

* chore: add changelog

* fix: use Binary as checksum type for InstantiateMsg

* chore: update changelog

* fix: revert checksum type back to Binary and use base64 deser

* chore: update changelog

* fix: use Binary for MeklePath + some helper methods

* add regression test

* update tests

---------

Co-authored-by: Ranadeep Biswas <[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.

2 participants