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

imp(ibc-client): rm TryFrom<Error = ClientError> restriction #1204

Merged
merged 9 commits into from
Apr 30, 2024

Conversation

rnbguy
Copy link
Collaborator

@rnbguy rnbguy commented Apr 28, 2024

Closes: #1203

Description

  • Removes Error = ClientError in TryFrom implementations. This prevented TryFrom<Error = Infallible> from being reused.
  • Reverses the direction of Convertible - so that ClientStateDecoder and ConsensusStateDecoder can be replaced by Convertible<Any>.

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 Apr 28, 2024

Codecov Report

Attention: Patch coverage is 96.55172% with 2 lines in your changes are missing coverage. Please review.

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

Files Patch % Lines
...nts/ics07-tendermint/src/client_state/execution.rs 83.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1204   +/-   ##
=======================================
  Coverage        ?   64.43%           
=======================================
  Files           ?      229           
  Lines           ?    22041           
  Branches        ?        0           
=======================================
  Hits            ?    14202           
  Misses          ?     7839           
  Partials        ?        0           

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

@rnbguy rnbguy marked this pull request as ready for review April 29, 2024 06:35
@rnbguy rnbguy requested a review from seanchen1991 April 29, 2024 06:40
@rnbguy
Copy link
Collaborator Author

rnbguy commented Apr 29, 2024

Looks like, with this - we can remove types::ClientState and types::ConsensusState usage in ICS-07 and use client_state::ClientState and consensus_state::ConsensusState directly.

This will reduce confusion for downstream users.

Copy link
Contributor

@seanchen1991 seanchen1991 left a comment

Choose a reason for hiding this comment

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

Nice; this is a really cool change! 👍

@seanchen1991 seanchen1991 added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit dc116da Apr 30, 2024
19 checks passed
@seanchen1991 seanchen1991 deleted the rano/rm-tryfrom-client-error-bound branch April 30, 2024 15:41
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* rm concrete Error type

* update ibc-core

* update tm client

* update cw-context

* Convertible in reverse direction

* update code

* use Convertible<Any>

* rm redundant bound

---------

Co-authored-by: Sean Chen <[email protected]>
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.

ics02: remove TryFrom<Error = ClientError> restriction
2 participants