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

x/upgrade: remove support for time based upgrades #8849

Merged
merged 15 commits into from
Mar 14, 2021

Conversation

technicallyty
Copy link
Contributor

Description

Removes support for time based upgrades. Motivation.

closes: #8801


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

@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #8849 (def349d) into master (0711e16) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8849      +/-   ##
==========================================
- Coverage   59.15%   59.15%   -0.01%     
==========================================
  Files         570      570              
  Lines       31775    31770       -5     
==========================================
- Hits        18796    18793       -3     
+ Misses      10777    10776       -1     
+ Partials     2202     2201       -1     
Impacted Files Coverage Δ
x/gov/legacy/v040/migrate.go 66.96% <ø> (-0.30%) ⬇️
x/auth/tx/service.go 72.85% <100.00%> (+3.50%) ⬆️
x/upgrade/keeper/keeper.go 74.22% <100.00%> (-0.78%) ⬇️
x/upgrade/types/plan.go 92.85% <100.00%> (+5.90%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

lgtm, pending changelog

proto/cosmos/upgrade/v1beta1/upgrade.proto Outdated Show resolved Hide resolved
we can have a governance vote to approve this upgrade at some future block time
or block height (e.g. 200000). This is known as an upgrade.Plan. The v0.38.0 code will not know of this
handler, but will continue to run until block 200000, when the plan kicks in at BeginBlock. It will check
we can have a governance vote to approve this upgrade at some future block height (e.g. 200000).
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for thinking about this file and the SPEC 👍

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Preapproving

@@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [\#8363](https://github.com/cosmos/cosmos-sdk/pull/8363) Addresses no longer have a fixed 20-byte length. From the SDK modules' point of view, any 1-255 bytes-long byte array is a valid address.
* [\#8346](https://github.com/cosmos/cosmos-sdk/pull/8346) All CLI `tx` commands generate ServiceMsgs by default. Graceful Amino support has been added to ServiceMsgs to support signing legacy Msgs.
* (crypto/ed25519) [\#8690] Adopt zip1215 ed2559 verification rules.
* [\#8849](https://github.com/cosmos/cosmos-sdk/pull/8849) Upgrade module no longer supports time based upgrades.
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect we want to add a Deprecated section and add this to that

CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

utACK. Would be great to have someone on Alessio's team to approve before putting automerge on.

@alessio
Copy link
Contributor

alessio commented Mar 12, 2021

@sahith-narahari @jgimeno please take a look when you spare a few minutes 🙏

@sahith-narahari
Copy link
Contributor

@AmauryM should we bump the version of upgrade.proto file in this PR?

@amaury1093
Copy link
Contributor

@AmauryM should we bump the version of upgrade.proto file in this PR?

We used reserved, so my understanding is that we don't need.

@aaronc Do you confirm the proto-breaking CI check is a buf bug?

@aaronc
Copy link
Member

aaronc commented Mar 12, 2021

@aaronc Do you confirm the proto-breaking CI check is a buf bug?

Not a buf bug. See https://docs.buf.build/breaking-rules#field_no_delete_unless_number_reserved and https://docs.buf.build/breaking-rules#field_no_delete_unless_name_reserved. We would need to change to config to allow this

@amaury1093
Copy link
Contributor

Ah yeah, okay. @technicallyty could you add those buf configs in this PR so that it's done for the future? We already merged 2-3 PRs before this one where we also introduced a reserved.

@aaronc
Copy link
Member

aaronc commented Mar 12, 2021

Ah yeah, okay. @technicallyty could you add those buf configs in this PR so that it's done for the future? We already merged 2-3 PRs before this one where we also introduced a reserved.

Yes, let's please add. "Protobuf / breakage" is not required in CI currently but I am going to enable it now (/cc @alessio).

@technicallyty
Copy link
Contributor Author

technicallyty commented Mar 12, 2021

Added an except for FIELD_NO_DELETE in breaking that lets reserved fields pass while still throwing an error for outright removed fields.

@alessio alessio added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 14, 2021
@mergify mergify bot merged commit c6af0ed into cosmos:master Mar 14, 2021
@orijbot
Copy link

orijbot commented Mar 14, 2021

@@ -26,6 +26,8 @@ lint:
breaking:
use:
- FILE
except:
- FIELD_NO_DELETE
Copy link
Member

Choose a reason for hiding this comment

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

It would be great if we had some comments about this line indicating that this still requires reserving the name and number. Could you add quickly in a separate PR @technicallyty ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove support for time based upgrades
7 participants