-
Notifications
You must be signed in to change notification settings - Fork 296
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
multi: Add forced deployment result network param. #3060
multi: Add forced deployment result network param. #3060
Conversation
e0aeb31
to
bf8764f
Compare
148e0e7
to
5982282
Compare
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 wonder if we should add some hard-coded safeguards to ensure that force choice can never be used on mainnet (either accidentally or maliciously).
5982282
to
3559b0c
Compare
Not a bad idea. I don't see any way it could realistically be exploited short of modifying the code (which one could always do anyway) because there are no CLI options or anything to control it, but it's good to be paranoid about such things. I've added a check during chain initialization to reject it. |
Currently, the lack of an entry for a given deployment in the chain parameters for a given network is treated the same as the deployment being active. This behavior is primarily in order to support testing without needing to go through the entire voting process on testing networks such as the simulation network as well as allows rule changes on newer versions of testnet networks that were previously accepted on prior versions. However, the existing approach has been pointed out on several occasions as being surprising behavior by those working on new consensus changes and it also means testing the voting process itself for new rule changes prior to their release requires a cumbersome sequence of not so obvious steps. Further, it also makes those historical pruned rule changes invisible to RPCs like getblockchaininfo. In order to address the aforementioned inconveniences, this adds a new parameter to the per-network chain parameters to specify a vote choice that should always be considered as having been the majority result of a vote and updates the relevant logic in blockchain accordingly to respect it. The new approach does not suffer from the aforementioned inconveniences as it permits a simple single line modification to allow the voting process to be tested as well as makes automatically activated historical rules visible to the RPCs like getblockchaininfo. Finally, this also adds previously pruned deployment parameters back to the relevant network parameters with the new field set to force them to be active.
3559b0c
to
5218eb1
Compare
This requires #3059.Currently, the lack of an entry for a given deployment in the chain parameters for a given network is treated the same as the deployment being active. This behavior is primarily in order to support testing without needing to go through the entire voting process on testing networks such as the simulation network as well as allows rule changes on newer versions of
testnet
networks that were previously accepted on prior versions.However, the existing approach has been pointed out on several occasions as being surprising behavior by those working on consensus changes and it also means testing the voting process itself for new rule changes prior to their release requires a cumbersome sequence of not so obvious steps. Further, it also makes those historical pruned rule changes invisible to RPCs like
getblockchaininfo
.In order to address the aforementioned inconveniences, this adds a new parameter to the per-network chain parameters to specify a vote choice that should always be considered as having been the majority result of a vote and updates the relevant logic in blockchain accordingly to respect it.
The new approach does not suffer from the aforementioned inconveniences as it permits a simple single line modification to allow the voting process to be tested as well as makes automatically activated historical rules visible to the RPCs like
getblockchaininfo
.Finally, this also adds previously pruned deployment parameters back to the relevant network parameters with the new field set to force them to be active.
Closes #3058.