-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ICS07 follow ups #5631
ICS07 follow ups #5631
Conversation
…on to 07-tendermint
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.
Thanks! Mostly looks good - a few remaining questions on abstraction boundaries, see comments.
Blocked on figuring out how to do cosmos/ibc#378 while maintaing current IBC abstractions. Plan to find a solution for this for IBC week Will address this in separate PR as its not required for demo |
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.
Looks good overall. I'm not sure what is the reasoning to move the messages to each specific client instead of ICS02.
Thanks @AdityaSripal
func HandleMsgCreateClient(ctx sdk.Context, k Keeper, msg exported.MsgCreateClient) (*sdk.Result, error) { | ||
clientType := exported.ClientTypeFromString(msg.GetClientType()) | ||
switch clientType { | ||
case 0: |
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.
no need for this case
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.
need it in case the string in msg does not match any of the expected values
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.
it will fall under the default
case
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
|
…itya/ics07-follow-ups
…s/cosmos-sdk into aditya/ics07-follow-ups
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.
utACK
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.
Changes LGTM. Additions from #5586 are still pending
@AdityaSripal Did you want to add those here or in a separate PR? |
Also, we should make sure that this PR fixes cosmos/relayer#27. |
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.
ACK pending minor comments
x/ibc/02-client/handler.go
Outdated
if !ok { | ||
return nil, sdkerrors.Wrap(ErrInvalidClientType, "Msg is not a Tendermint CreateClient msg") | ||
} | ||
clientState, err := ibctmtypes.InitializeFromMsg(tmMsg) |
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.
move out of the switch
statement
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.
also, you can just use Initialize
here
Codecov Report
@@ Coverage Diff @@
## fedekunze/ics07-follow-ups #5631 +/- ##
==============================================================
+ Coverage 42.54% 42.55% +<.01%
==============================================================
Files 375 375
Lines 29855 29861 +6
==============================================================
+ Hits 12702 12706 +4
- Misses 16040 16042 +2
Partials 1113 1113
|
* ADR07 follow up changes * add assertion checks * update ICS02 tests * update ICS07 tests * add trusting and ubd period to msg * tests * more test updates * ICS07 follow ups (#5631) * refactor tendermint package to move msgs here * fix rest of package to accomadate 07 refactor * added GetHeight to ConsensusState and moved clientstate struct creation to 07-tendermint * start work on making misbehavior retrieve consensusState LTE misbehavior * allow misbehavior submission at height not equal to persisted consensusState * optimize submitMisbehavior by erroring earlier * cleanup misbehavior and propose lazy fix * fix bug * Update x/ibc/02-client/keeper/client.go Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * address fede review * add chain-id into clientstate * address necessary fede review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aditya <adityasripal@gmail.com>
Addresses comments from #5485 (review)
Implements changes from cosmos/ibc#367
Description
Fixes to ICS7 to allow for safe updating/submitting misbehavior while ensuring the ICS2 package remains independent of tendermint specific client logic
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)