-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add logic to switch from bandwidth to rc_plugin for HF 20 #2665
Conversation
fc8ae22
to
b84e063
Compare
Here are the requirements as I see them:
Now let's audit the code against these requirements. My understanding is that adding This approach makes requirements (b) and (f) easy. Also, the code does carefully consider the default case, so it passes (c). The main problem is requirement (a). The RC plugin is always active, it needs to have some kind of toggle flag as well. And due to requirement (a), it should refuse to produce blocks if neither flag is active. Is requirement (a) really a requirement? Think it through. If it turns out that on the live network, the new code is too restrictive, we will need a way to turn it off. If it is restricting transactions, and there is no configuration toggle to turn it off, that would be a problem. |
What needs to be added is a way to set Additionally, if we want to prevent overly restrictive semantics, we can perform and xor between ! |
The
Unfortunately, these two flags have opposite "polarity":
The "proper" fix, architecturally, is probably to refactor so that both flags the same "polarity" [1]. The "quick hack" fix is to just change the inequality from My suggestion is to put the "quick hack" fix in this PR, then make a separate issue/PR for the flag rename / repolarization. (Edit: I made issue #2703) [1] Since this code's never been in a numbered release, we should be able to just rename the config option without breaking anyone's deployments. We won't have this luxury once the code makes it into a numbered release. |
Looks like it's ready to merge |
Closes #2648