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

chore: remove refs to AllowUpdateToExpired/Frozen client booleans #1768

Merged
merged 10 commits into from
Jul 28, 2022

Conversation

charleenfei
Copy link
Contributor

Description

closes #1237

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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@charleenfei
Copy link
Contributor Author

charleenfei commented Jul 22, 2022

question @colin-axner -- should the proto fields also be removed? currently it's API breaking (still need to finish updating the CHANGELOG) but updated the protos would make it also state machine breaking (right?) should we just do this in one go?

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2022

Codecov Report

Merging #1768 (370b12b) into main (af4e651) will decrease coverage by 0.16%.
The diff coverage is 67.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1768      +/-   ##
==========================================
- Coverage   80.04%   79.88%   -0.17%     
==========================================
  Files         166      166              
  Lines       12421    12436      +15     
==========================================
- Hits         9943     9935       -8     
- Misses       2013     2033      +20     
- Partials      465      468       +3     
Impacted Files Coverage Δ
cmd/build_test_matrix/main.go 70.83% <0.00%> (-3.46%) ⬇️
modules/apps/27-interchain-accounts/module.go 54.87% <0.00%> (-2.82%) ⬇️
modules/apps/29-fee/module.go 53.57% <0.00%> (-1.99%) ⬇️
modules/apps/transfer/keeper/migrations.go 93.10% <ø> (-0.23%) ⬇️
modules/apps/transfer/keeper/relay.go 88.11% <ø> (ø)
modules/apps/transfer/module.go 56.25% <0.00%> (-1.82%) ⬇️
modules/core/02-client/keeper/client.go 98.22% <ø> (ø)
modules/core/02-client/keeper/grpc_query.go 68.20% <ø> (ø)
modules/core/02-client/keeper/proposal.go 86.36% <ø> (ø)
modules/core/03-connection/keeper/handshake.go 89.83% <ø> (-0.06%) ⬇️
... and 31 more

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one small comment on the changelog entry 🥇

CHANGELOG.md Outdated
@@ -54,6 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (transfer)[\#1565](https://github.com/cosmos/ibc-go/pull/1565) Removing `NewErrorAcknowledgement` in favour of `channeltypes.NewErrorAcknowledgement`.
* (channel)[\#1565](https://github.com/cosmos/ibc-go/pull/1565) Updating `NewErrorAcknowledgement` to accept an error instead of a string and removing the possibility of non-deterministic writes to application state.
* (core/04-channel)[\#1636](https://github.com/cosmos/ibc-go/pull/1636) Removing `SplitChannelVersion` and `MergeChannelVersions` functions since they are not used.
* (light-clients/tendermint)[\#1768](https://github.com/cosmos/ibc-go/pull/1768/files) Removed `AllowUpdateAfter...` booleans as they are deprecated (see ADR026)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] maybe we should explicitly list the booleans to make it more clear what exactly was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, i will update!

@@ -101,7 +101,6 @@ func (cs ClientState) VerifyUpgradeAndUpdateState(
newClientState := NewClientState(
tmUpgradeClient.ChainId, cs.TrustLevel, cs.TrustingPeriod, tmUpgradeClient.UnbondingPeriod,
cs.MaxClockDrift, tmUpgradeClient.LatestHeight, tmUpgradeClient.ProofSpecs, tmUpgradeClient.UpgradePath,
cs.AllowUpdateAfterExpiry, cs.AllowUpdateAfterMisbehaviour,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there's a sideaffect here. These parameters will be set to false, false upon upgrades (even if the previous values were true, true). Shouldn't cause an issue, but is worth being aware of

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can add an inline doc for this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a note in upgrade docs about this

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work!

@colin-axner
Copy link
Contributor

It probably makes sense to include this in v6 instead of v5 (ie wait for the release branch to be created), just in case there's any issues for users with the changing of NewClientState API (thinking of backwards compatibility to older versions)

@charleenfei
Copy link
Contributor Author

It probably makes sense to include this in v6 instead of v5 (ie wait for the release branch to be created), just in case there's any issues for users with the changing of NewClientState API (thinking of backwards compatibility to older versions)

cc @crodriguezvega

@charleenfei charleenfei merged commit 029e428 into main Jul 28, 2022
@charleenfei charleenfei deleted the charly/remove_ref_allow_update branch July 28, 2022 12:36
@charleenfei charleenfei restored the charly/remove_ref_allow_update branch July 28, 2022 13:16
charleenfei added a commit that referenced this pull request Jul 28, 2022
charleenfei added a commit that referenced this pull request Jul 28, 2022
@mergify
Copy link
Contributor

mergify bot commented Aug 1, 2022

⚠️ The sha of the head commit of this PR conflicts with #1843. Mergify cannot evaluate rules on this PR. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove AllowUpdateAfterExpiry and AllowUpdateAfterMisbehaviour references
4 participants