Fix "Unknown new rules activated" Error & Uninitialized Variable nMinerConfirmationWindow, Revert Changes #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After digging in deep into the "Unknown new rules activated" issue we have actually revealed multiple unknown issues we can now correct. So I really appreciate Barry's help as well as others feedback on this. We definitely have some great collaboration here. This PR is a continuation of Barrys PR: #75
The issue with adding:
Is that then causes an issue for potential future algo swaps as there are reserved bits below BLOCK_VERSION_ALGO.
If anything it should be Odo specific:
However the easier fix is much more nuanced. It appears BTC devs ran into similar issue and the problem is a un initialized variable "nMinerConfirmationWindow" and we need to hard code the consensus.MinBIP9WarningHeight. Bitcoin devs corrected and fixed a similar issue here: bitcoin/bitcoin#17449
So basically this needs changed
To
Barry identified a message in his PR about VERSIONBITS_NUM_BITS_TO_SKIP which shows we never fully reverted test changes made in 2017.
VERSIONBITS_NUM_BITS_TO_SKIP was actually reverted the very next day they were proposed, however the one thing never reverted was static const int32_t VERSIONBITS_NUM_BITS = 16.
That should be 29. So 29 should be the max number of potential version bits. Also, Barrys commits in here fully bury Odocrypt deployment as they should be.
Thanks to everyone for your help looking into this. This was the last major issue I have been able to identify with 8.22. My recommendation is we get this merged into the develop branch and test mining, and taproot activation. Once there we are done with BTC v22 merge and can move on to other v8.22 enhancements.