Skip to content

Commit

Permalink
remove duplicate checks in upgrade logic (#182)
Browse files Browse the repository at this point in the history
* remove duplicate checks

* changelog
  • Loading branch information
colin-axner authored May 24, 2021
1 parent 2523fdb commit 0d01128
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* (07-tendermint) [\#182](https://github.com/cosmos/ibc-go/pull/182) Remove duplicate checks in upgrade logic.
* (modules/core/04-channel) [\#7949](https://github.com/cosmos/cosmos-sdk/issues/7949) Standardized channel `Acknowledgement` moved to its own file. Codec registration redundancy removed.
* (modules/core/04-channel) [\#144](https://github.com/cosmos/ibc-go/pull/144) Introduced a `packet_data_hex` attribute to emit the hex-encoded packet data in events. This allows for raw binary (proto-encoded message) to be sent over events and decoded correctly on relayer. Original `packet_data` is DEPRECATED. All relayers and IBC event consumers are encouraged to switch to `packet_data_hex` as soon as possible.
* (modules/light-clients/07-tendermint) [\#125](https://github.com/cosmos/ibc-go/pull/125) Implement efficient iteration of consensus states and pruning of earliest expired consensus state on UpdateClient.
Expand Down
4 changes: 0 additions & 4 deletions modules/core/02-client/types/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ func (up *UpgradeProposal) ValidateBasic() error {
return err
}

if up.Plan.Height <= 0 {
return sdkerrors.Wrap(ErrInvalidUpgradeProposal, "IBC chain upgrades must set a positive height")
}

if up.UpgradedClientState == nil {
return sdkerrors.Wrap(ErrInvalidUpgradeProposal, "upgraded client state cannot be nil")
}
Expand Down
4 changes: 0 additions & 4 deletions modules/light-clients/07-tendermint/types/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ func (cs ClientState) VerifyUpgradeAndUpdateState(
return nil, nil, sdkerrors.Wrap(err, "could not retrieve consensus state for lastHeight")
}

if cs.IsExpired(consState.Timestamp, ctx.BlockTime()) {
return nil, nil, sdkerrors.Wrap(clienttypes.ErrInvalidClient, "cannot upgrade an expired client")
}

// Verify client proof
bz, err := cdc.MarshalInterface(upgradedClient)
if err != nil {
Expand Down

0 comments on commit 0d01128

Please sign in to comment.