pow: indexer blocks use powLimit even on regtest - #25
Open
Avecci-Claussen wants to merge 1 commit into
Open
Avecci-Claussen wants to merge 1 commit into
Avecci-Claussen wants to merge 1 commit into
Conversation
GetNextWorkRequired checked fPowNoRetargeting before the indexer branch, so on regtest an indexer block was required to carry the previous block's nBits instead of powLimit, contradicting the indexer rule that ContextualCheckBlockHeader expects and the documented behaviour. Move the indexer check first. fPowNoRetargeting is only set on regtest, so mainnet/testnet3 behaviour is unchanged.
Collaborator
|
Thanks for taking the time to review the code and submit these PRs. We appreciate the effort and suggestions. After consideration, we’ve decided not to move forward with these changes at this time, so we’ll be closing these PRs. Thank you for your understanding. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In
GetNextWorkRequired, the regtest no-retargeting shortcut(
fPowNoRetargeting→ return previousnBits) was evaluated before theindexer-block rule (return
powLimit). On regtest, an indexer blockfollowing a mined block would therefore be required to carry the previous
block's
nBitsinstead ofpowLimit, contradicting the FIP-101 rulethat indexer blocks always use
powLimitand breaking regtest setupsthat mine indexer blocks after non-trivial-PoW blocks.
Reorder the checks so the indexer rule wins. Mainnet/testnet behavior is
unchanged (both checks only matter on regtest).
Test plan:
pow_testsrun (pre-existing Fractal DAA expectationfailures unchanged; no new failures).