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

feat!: support coordinated v2 upgrade with flag #2803

Merged
merged 21 commits into from
Nov 9, 2023
Merged

Conversation

cmwaters
Copy link
Contributor

@cmwaters cmwaters commented Nov 1, 2023

Overview

As discussed, given no pre-existing coordinating mechanism (i.e. signalling), v2 will have to work differently to future upgrades. Namely, nodes will run start with an upgrade-height flag. At the height before that in EndBlock, the protocol version will be updated and cometbft will receive the new v2 app version. There will be no state migrations. The block at the following height will be v2 and validators will begin validating and executing accordingly.

I plan on following up with this with a e2e test upgrading from v1.x to main.

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@cmwaters cmwaters changed the title feat: support coordinated v2 upgrade with flag feat!: support coordinated v2 upgrade with flag Nov 1, 2023
@cmwaters cmwaters changed the base branch from main to cal/minor-upgrade-testing November 6, 2023 11:44
@cmwaters cmwaters marked this pull request as ready for review November 6, 2023 11:44
@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2023

Codecov Report

Merging #2803 (422cc9d) into main (75f9393) will decrease coverage by 0.64%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##             main    #2803      +/-   ##
==========================================
- Coverage   19.80%   19.17%   -0.64%     
==========================================
  Files         144      142       -2     
  Lines       17398    17282     -116     
==========================================
- Hits         3446     3313     -133     
- Misses      13631    13667      +36     
+ Partials      321      302      -19     
Files Coverage Δ
app/prepare_proposal.go 0.00% <ø> (ø)
app/process_proposal.go 0.00% <ø> (ø)
test/tokenfilter/setup.go 100.00% <100.00%> (ø)
x/upgrade/keeper.go 23.68% <100.00%> (+3.17%) ⬆️
x/upgrade/types.go 24.13% <ø> (-59.00%) ⬇️
app/app.go 4.41% <0.00%> (+0.05%) ⬆️
cmd/celestia-appd/cmd/root.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

rootulp
rootulp previously approved these changes Nov 6, 2023
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Overall LGTM and seems a bit easier to maintain than a map of upgradeSchedules. My only feedback is around clarifying (either via godoc or flag rename) that the --upgrade-height flag is only applicable to the v1 to v2 upgrade.

app/app.go Show resolved Hide resolved
cmd/celestia-appd/cmd/root.go Outdated Show resolved Hide resolved
cmd/celestia-appd/cmd/root.go Outdated Show resolved Hide resolved
evan-forbes
evan-forbes previously approved these changes Nov 6, 2023
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

👍

@celestia-bot celestia-bot requested a review from a team November 6, 2023 14:41
@evan-forbes
Copy link
Member

this still LGTM, but out of curiosity, did we add a commit here and github is still letting us merge without getting more approves?

@rootulp
Copy link
Collaborator

rootulp commented Nov 7, 2023

I think the approvals didn't get dismissed b/c this PR targets a feature branch cal/minor... that doesn't have this setting:

Screenshot 2023-11-07 at 5 41 46 PM

@evan-forbes
Copy link
Member

ahh I see thanks. assumed it was towards main

@cmwaters
Copy link
Contributor Author

cmwaters commented Nov 8, 2023

I assume when it switches, it will dismiss the review

Base automatically changed from cal/minor-upgrade-testing to main November 8, 2023 15:58
@cmwaters cmwaters dismissed stale reviews from evan-forbes and rootulp November 8, 2023 15:58

The base branch was changed.

Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Still LGTM

@cmwaters cmwaters merged commit 9270f4b into main Nov 9, 2023
29 checks passed
@cmwaters cmwaters deleted the cal/configured-upgrades branch November 9, 2023 10:38
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.

4 participants