Skip to content

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

Merged
near-bulldozer[bot] merged 15 commits into
masterfrom
nikurt-voting
Mar 4, 2022
Merged

NEP205: Delay voting for new version until a certain date and time#6309
near-bulldozer[bot] merged 15 commits into
masterfrom
nikurt-voting

Conversation

@nikurt

@nikurt nikurt commented Feb 17, 2022

Copy link
Copy Markdown
Contributor

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.
Comment thread core/primitives/src/upgrade_schedule.rs Outdated

@bowenwang1996 bowenwang1996 left a comment

Copy link
Copy Markdown
Contributor

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?

Comment thread core/primitives/src/upgrade_schedule.rs Outdated
Comment thread core/primitives/src/version.rs Outdated
Comment thread core/primitives/src/version.rs Outdated
@nikurt
nikurt requested a review from bowenwang1996 February 23, 2022 17:26
@bowenwang1996

Copy link
Copy Markdown
Contributor

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

@nikurt

nikurt commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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.

Comment thread core/primitives/src/upgrade_schedule.rs Outdated
Comment thread core/primitives/src/upgrade_schedule.rs
Comment thread core/primitives/src/version.rs Outdated
@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
Comment thread core/primitives/src/upgrade_schedule.rs Outdated
Comment thread core/primitives/src/upgrade_schedule.rs Outdated
Comment thread core/primitives/src/version.rs Outdated
@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
Copy Markdown
Contributor

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

@nikurt

nikurt commented Mar 7, 2022

Copy link
Copy Markdown
Contributor Author

@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