-
Notifications
You must be signed in to change notification settings - Fork 92
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: make it easier to use custom verifiers for Tendermint clients #1168
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2ca18f5
imp: simplify introducing custom verifier object
Farhad-Shabani ad4fbdd
chore: add changelog
Farhad-Shabani d39bfa7
Update .changelog/unreleased/breaking-changes/1168-discard-TmVerifier.md
seanchen1991 03f2c38
Update ibc-clients/ics07-tendermint/src/client_state/validation.rs
seanchen1991 aa73d13
Update .changelog/unreleased/breaking-changes/1168-discard-TmVerifier.md
seanchen1991 d76bd37
Update ibc-clients/ics07-tendermint/src/client_state/validation.rs
seanchen1991 ea0fe69
Update ibc-clients/ics07-tendermint/src/client_state/validation.rs
seanchen1991 b8244a5
docs: nudge toward implementing a newtype wrapper
Farhad-Shabani 8fe4460
nit
Farhad-Shabani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.changelog/unreleased/breaking-changes/1168-discard-TmVerifier.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- [ibc-client-tendermint] Simplify custom verifiers usage for Tendermint | ||
clients by directly binding with `tendermint_light_client_verifier::Verifier` | ||
and removing the unused `TmVerifier` trait. | ||
([\#1168](https://github.com/cosmos/ibc-rs/pull/1168)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused about how I would reuse this interface for a custom verifier. After I implement
Verifier
trait for my custom logic, how do I pass it here instead ofProdVerifier::default()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See if this works. b8244a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct to conclude that someone has to create a wrapper struct:
and delegate all calls except this one? If I am correct, can we add a generic to the current
ClientState
?I am just confirming my understanding. If you already plan for this in future PRs, go ahead with this current merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right
Our plan was to do this, but adding a generic introduces complications that eventually lead to refactoring some of the APIs as well. Aside from that, we didn't want to introduce complexity to normal users.
We can consider the generic or even writing macros in the future if there be a serious need.