-
Notifications
You must be signed in to change notification settings - Fork 612
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
Zero out client state before processing upgraded client proof #1530
Zero out client state before processing upgraded client proof #1530
Conversation
@@ -452,9 +452,6 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { | |||
cs := suite.chainA.GetClientState(path.EndpointA.ClientID) | |||
clientStore := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) | |||
|
|||
// Call ZeroCustomFields on upgraded clients to clear any client-chosen parameters in test-case upgradedClient |
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.
this caused a test an existing test case to pass unsuccessful upgrade: committed client does not have zeroed custom fields
, this test now passes due to the zeroing in VerifyUpgradeAndUpdateState
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 would add some document the reasoning behind this change otherwise lgtm :)
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. | |||
* (07-tendermint) [\#1530](https://github.com/cosmos/ibc-go/pull/1530) Submitted client state is zeroed out before checking the proof. |
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 should document the reasoning behind #291 here
@@ -18,7 +18,7 @@ import ( | |||
// in client state that must be the same across all valid Tendermint clients for the new chain. |
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.
maybe add a comment that zeroing out the submitted client prevents the proposal from containing information governance is not actually voting on, see previous CHANGELOG comment
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.
Should this also be targeted for 02-client-refactor
branch?
@damiannolan changing the base branch introduced a massive amount of merge conflicts, I think we can leave this PR open and once @colin-axner returns we can discuss if it needs to be included in the client refactor or if we can just merge to main. |
Closing in favour of: #1674 |
Description
closes: #292
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