-
Notifications
You must be signed in to change notification settings - Fork 586
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
Check that client state is zeroed out for ibc client upgrade proposals #1529
Check that client state is zeroed out for ibc client upgrade proposals #1529
Conversation
suite.Require().NoError(err) | ||
}, true, | ||
}, | ||
{ | ||
"fails validate abstract - empty title", func() { | ||
proposal, err = types.NewUpgradeProposal("", ibctesting.Description, plan, cs) | ||
proposal, err = types.NewUpgradeProposal("", ibctesting.Description, plan, cs.ZeroCustomFields()) |
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.
previous tests did not have zeroed out state.
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.
same comment as previous PR otherwise but otherwise nice one
CHANGELOG.md
Outdated
@@ -81,6 +81,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output | |||
* (apps/29-fee) [\#1278](https://github.com/cosmos/ibc-go/pull/1278) The URI path for the query to get all incentivized packets for a specific channel did not follow the same format as the rest of queries. | |||
* (apps/29-fee)[\#1343](https://github.com/cosmos/ibc-go/pull/1523) Fixed an issue where a bad refund address would prevent channel closure. | |||
* (modules/core/02-client)[\#1529](https://github.com/cosmos/ibc-go/pull/1529) Client state must be zeroed out for `UpgradeProposals` to pass validation. |
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.
same comment about reasoning as in the other PR
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 think it would be clearer if we refer to ClientState
as a type name without space
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 think we can target this for the 02-client-refactor
branch based off this comment
Thanks @chatton!
|
||
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
"reflect" |
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.
nit: group import statements like so:
import (
// standard library imports
"fmt"
"testing"
// external library imports
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
// ibc-go library imports
"github.com/cosmos/ibc-go/modules/core/23-commitment/types"
)
CHANGELOG.md
Outdated
@@ -81,6 +81,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output | |||
* (apps/29-fee) [\#1278](https://github.com/cosmos/ibc-go/pull/1278) The URI path for the query to get all incentivized packets for a specific channel did not follow the same format as the rest of queries. | |||
* (apps/29-fee)[\#1343](https://github.com/cosmos/ibc-go/pull/1523) Fixed an issue where a bad refund address would prevent channel closure. | |||
* (modules/core/02-client)[\#1529](https://github.com/cosmos/ibc-go/pull/1529) Client state must be zeroed out for `UpgradeProposals` to pass validation. |
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 think it would be clearer if we refer to ClientState
as a type name without space
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 agree with @charleenfei's and @damiannolan's comments. Other than that, nice work, @chatton!
Codecov Report
@@ Coverage Diff @@
## main #1529 +/- ##
=======================================
Coverage 80.29% 80.30%
=======================================
Files 166 166
Lines 12304 12307 +3
=======================================
+ Hits 9880 9883 +3
Misses 1959 1959
Partials 465 465
|
…roed-out-for-ibc-client-upgrade-proposals
…roed-out-for-ibc-client-upgrade-proposals
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.
Great work! :)
Agree with above comments ^
…roed-out-for-ibc-client-upgrade-proposals
…r-ibc-client-upgrade-proposals' of https://github.com/cosmos/ibc-go into cian/issue#291-check-that-client-state-is-zeroed-out-for-ibc-client-upgrade-proposals
Closing in favour of #1676 |
Description
closes: #291
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes