Skip to content
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

remove AllowUpdateAfterMisbehaviour/AllowUpdateAfterExpiry from 07-te… #5855

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions modules/core/02-client/proposal_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() {

tmClientState, ok := subjectClientState.(*ibctm.ClientState)
suite.Require().True(ok)
tmClientState.AllowUpdateAfterMisbehaviour = true
tmClientState.FrozenHeight = tmClientState.LatestHeight
suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), subjectPath.EndpointA.ClientID, tmClientState)

// replicate changes to substitute (they must match)
tmClientState, ok = substituteClientState.(*ibctm.ClientState)
suite.Require().True(ok)
tmClientState.AllowUpdateAfterMisbehaviour = true
suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), substitutePath.EndpointA.ClientID, tmClientState)

content = clienttypes.NewClientUpdateProposal(ibctesting.Title, ibctesting.Description, subjectPath.EndpointA.ClientID, substitutePath.EndpointA.ClientID)
Expand Down
5 changes: 0 additions & 5 deletions modules/light-clients/07-tendermint/proposal_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ func IsMatchingClientState(subject, substitute ClientState) bool {
substitute.TrustingPeriod = time.Duration(0)
subject.ChainId = ""
substitute.ChainId = ""
// sets both sets of flags to true as these flags have been DEPRECATED, see ADR-026 for more information
subject.AllowUpdateAfterExpiry = true
substitute.AllowUpdateAfterExpiry = true
subject.AllowUpdateAfterMisbehaviour = true
substitute.AllowUpdateAfterMisbehaviour = true

return reflect.DeepEqual(subject, substitute)
}
187 changes: 57 additions & 130 deletions modules/light-clients/07-tendermint/tendermint.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions proto/ibc/lightclients/tendermint/v1/tendermint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ message ClientState {
// the default upgrade module, upgrade_path should be []string{"upgrade",
// "upgradedIBCState"}`
repeated string upgrade_path = 9;

// allow_update_after_expiry is deprecated
bool allow_update_after_expiry = 10 [deprecated = true];
// allow_update_after_misbehaviour is deprecated
bool allow_update_after_misbehaviour = 11 [deprecated = true];

reserved 10 to 11;
}

// ConsensusState defines the consensus state from Tendermint.
Expand Down