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

NEP205: Delay voting for new version until a certain date and time #6309

Merged
merged 15 commits into from
Mar 4, 2022

Conversation

nikurt
Copy link
Contributor

@nikurt nikurt commented Feb 17, 2022

See near/NEPs#205
This PR enables clients to extend the protocol upgrade window, but indirectly. This PR lets clients upgrade early but not announce the fact of the upgrade until a certain date in the future.

Normal upgrades:

  • Clients will delay voting until a certain date.

Emergency upgrades:

  • Voting for the new version starts immediately and a protocol upgrade becomes effective in 1-2 epochs.

Instead of a protocol change, add a mechanism to voluntarily delay voting for the new protocol version.
Copy link
Collaborator

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

Do we plan to manually set the upgrade time in code every time we do a new release for both testnet and mainnet? If so, how could we make sure that we don't forget to do it?

core/primitives/src/upgrade_schedule.rs Outdated Show resolved Hide resolved
core/primitives/src/version.rs Outdated Show resolved Hide resolved
core/primitives/src/version.rs Outdated Show resolved Hide resolved
@bowenwang1996
Copy link
Collaborator

@nikurt please answer my question above #6309 (review)

@nikurt
Copy link
Contributor Author

nikurt commented Feb 24, 2022

@bowenwang1996 sorry for missing the question.
Yes, we'll have to manually update it every time.
Also we can't assume that this date is always set, because emergency releases should leave the schedule empty.
I'm struggling to find a good way to automate the check whether the field was intentionally updated or intentionally not updated (multiple emergency releases in a row).

Every release requires a manual update of version in two Cargo.toml files. Maybe if we somehow move the schedule definition to Cargo.toml it will make the human error less likely? However it doesn't exclude the human error completely.

@abacabadabacaba do you have suggestions?

@mzhangmzz
Copy link
Contributor

@bowenwang1996 sorry for missing the question. Yes, we'll have to manually update it every time. Also we can't assume that this date is always set, because emergency releases should leave the schedule empty. I'm struggling to find a good way to automate the check whether the field was intentionally updated or intentionally not updated (multiple emergency releases in a row).

Every release requires a manual update of version in two Cargo.toml files. Maybe if we somehow move the schedule definition to Cargo.toml it will make the human error less likely? However it doesn't exclude the human error completely.

@abacabadabacaba do you have suggestions?

Instead of only saving the current update time, how about store a dictionary from protocol versions to update times, so each time we upgrade, we have to add a new entry to the dictionary. For emergency update, the entry value will be None, but there still must be an entry.

core/primitives/src/upgrade_schedule.rs Outdated Show resolved Hide resolved
core/primitives/src/upgrade_schedule.rs Show resolved Hide resolved
core/primitives/src/version.rs Outdated Show resolved Hide resolved
@nikurt nikurt requested a review from mm-near March 1, 2022 14:07
@nikurt nikurt requested a review from matklad March 3, 2022 10:56
core/primitives/src/upgrade_schedule.rs Outdated Show resolved Hide resolved
core/primitives/src/upgrade_schedule.rs Outdated Show resolved Hide resolved
core/primitives/src/version.rs Outdated Show resolved Hide resolved
@near-bulldozer near-bulldozer bot merged commit cfba9e9 into master Mar 4, 2022
@near-bulldozer near-bulldozer bot deleted the nikurt-voting branch March 4, 2022 12:49
@bowenwang1996
Copy link
Collaborator

@nikurt could you document this change in go/nearcore-release ?

@nikurt
Copy link
Contributor Author

nikurt commented Mar 7, 2022

@bowenwang1996 documented

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.

5 participants