-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement automatic shutdown of deprecated Zcash versions #2297
Conversation
Started after warning threshold, deprecation threshold reached: Started after deprecation, |
Can the messages be wrapped using |
Also, "deprecation" to me means that the use of something is discouraged but it still works. We need a different word. |
@daira In a sense it still works because you can bypass the shutdown, you just have to acknowledge the deprecation and explicitly ignore it. Like selectively disabling a compiler warning. (With warnings set to error. 😄) |
src/init.cpp
Outdated
@@ -344,6 +344,7 @@ std::string HelpMessage(HelpMessageMode mode) | |||
#endif | |||
} | |||
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory")); | |||
strUsage += HelpMessageOpt("-disabledeprecation=<version>", _("Disable block-height node deprecation")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to understand what exactly <version>
is here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add documentation for <version>
in the help string.
@daira @ebfull I went with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK: There's no automated test coverage of this EnforceNodeDeprecation
.
|
||
// Deprecation policy is 4th third-Tuesday after a release | ||
static const int APPROX_RELEASE_HEIGHT = 115000; | ||
static const int WEEKS_UNTIL_DEPRECATION = 18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment like: // We use 18 weeks to ensure auto-deprecation is *always* > 4 months, barring block time skew issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above; this value is to be updated during the release process such that it is the correct number of weeks for that release.
#define ZCASH_DEPRECATION_H | ||
|
||
// Deprecation policy is 4th third-Tuesday after a release | ||
static const int APPROX_RELEASE_HEIGHT = 115000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's important to me that this has a very high chance of occuring after the release day. Add a comment with release date and back-of-the-envelope calculations showing some grace period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you review the whole PR? I updated the release process to require that these values are updated, so it will always be the case that this value occurs after the release day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did read the whole PR. My rationale was someone reading this code who doesn't know our release process would know how we calculated the number. It's not important enough to block the PR, and the comment on the preceding line should make it clear enough.
Force-pushed to squash the following changes in:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent unit tests of the boundary conditions, shutdown, logging, and disabling behaviors!
#define ZCASH_DEPRECATION_H | ||
|
||
// Deprecation policy is 4th third-Tuesday after a release | ||
static const int APPROX_RELEASE_HEIGHT = 115000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did read the whole PR. My rationale was someone reading this code who doesn't know our release process would know how we calculated the number. It's not important enough to block the PR, and the comment on the preceding line should make it clear enough.
I'm not sure I understand the point of the version parameter. You could still remind the user what version he is running in the message here |
The reasoning IMHO is that we don't want that parameter to be "whatever version I'm running, even if I don't remember my version number", because that is exactly equivalent to "ignore deprecation always", and that is a much easier flag to have added in third-party default configs and then be forgotten about, which removes the benefit of this feature almost entirely (because it is effectively no longer by default). If the current version is necessary, then either the user is required to think about that flag on every upgrade (which is additional friction as @bitcartel noted here), or the third party wallet etc. is required to consider it when designing their UI. Either case is I think much closer to the desired goals of this feature. Of course, this assumes we do go for this feature (auto-senescence) instead of one of the other approaches being discussed in #2274. |
OK that makes sense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ut(ACK+cov), modulo one nonblocking comment.
DEPRECATION_HEIGHT) + " " + | ||
_("You should upgrade to the latest version of Zcash.") + " " + | ||
strprintf(_("To disable deprecation for this version, set %s%s."), | ||
"-disabledeprecation=", CLIENT_VERSION_STR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should say "To disable deprecation shutdown..." and (less important) that the option name should be "-disabledeprecationshutdown=".
@zkbot r+ |
📌 Commit b4f861d has been approved by |
⌛ Testing commit b4f861d with merge 301db3a0a548d2e6900564aecf284117d6efc8d8... |
💔 Test failed - pr-merge |
@zkbot retry |
Implement automatic shutdown of deprecated Zcash versions Closes #2274.
Will this merge close ticket #2274 partially or fully? I was under the impression we were still discussing this PR, based on what @str4d wrote above:
I just posted a comment yesterday on the ticket: #2274 (comment) I was hoping we would have more discussion about how this feature might be deployed as in its current form its a big change for end users. |
Closes #2274.