forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 117
improvement(tendermint): safer IBC channel handler #2298
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
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3368dec
read new field `ibc_channels` from coins file
onur-ozkan 8696db6
remove old IBC logics
onur-ozkan a8ce167
update channel finding logic
onur-ozkan edad587
Merge branch 'dev' of github.com:KomodoPlatform/komodo-defi-framework…
onur-ozkan 963ae4e
use default `HashMap` if `ibc_channels` isn't provided
onur-ozkan a412636
support backup IBC clients for recovery when first one isn't available
onur-ozkan effa2d2
implement channel querying
onur-ozkan 0bc8220
finish test coverage
onur-ozkan a85b082
better error message
onur-ozkan 9cd189d
handle IBC channel IDs stricter
onur-ozkan cad4e60
more fee for IBC withdraws
onur-ozkan c9858fd
accept only one channel id on per network
onur-ozkan d4ccb83
address nits
onur-ozkan 2857691
nits
onur-ozkan b2add2f
remove iobscan ref link
onur-ozkan 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,12 @@ | ||
| use std::fmt; | ||
|
|
||
| #[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, Hash)] | ||
| pub struct ChannelId(u16); | ||
|
|
||
| impl fmt::Display for ChannelId { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "channel-{}", self.0) } | ||
| } | ||
|
|
||
| impl ChannelId { | ||
| pub fn new(id: u16) -> Self { Self(id) } | ||
| } |
This file was deleted.
Oops, something went wrong.
105 changes: 0 additions & 105 deletions
105
mm2src/coins/rpc_command/tendermint/ibc_transfer_channels.rs
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,13 +1,2 @@ | ||
| mod ibc_chains; | ||
| mod ibc_transfer_channels; | ||
| pub mod ibc; | ||
| pub mod staking; | ||
|
|
||
| pub use ibc_chains::*; | ||
| pub use ibc_transfer_channels::*; | ||
|
|
||
| // Global constants for interacting with https://github.com/KomodoPlatform/chain-registry repository | ||
| // using `mm2_git` crate. | ||
| pub(crate) const CHAIN_REGISTRY_REPO_OWNER: &str = "KomodoPlatform"; | ||
| pub(crate) const CHAIN_REGISTRY_REPO_NAME: &str = "chain-registry"; | ||
| pub(crate) const CHAIN_REGISTRY_BRANCH: &str = "nucl"; | ||
| pub(crate) const CHAIN_REGISTRY_IBC_DIR_NAME: &str = "_IBC"; |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Breakage 2: This now expects a numeric value (previously it accepted any
Stringvalue without validation by hoping it was using in thechannel-$idformat) to align with the logic used in the coins file.