PoW algorithm candidate: Keccak#10
Open
luke-jr wants to merge 13 commits intoBitcoinHardfork:0.14-uasf_backup_hardforkfrom
Open
PoW algorithm candidate: Keccak#10luke-jr wants to merge 13 commits intoBitcoinHardfork:0.14-uasf_backup_hardforkfrom
luke-jr wants to merge 13 commits intoBitcoinHardfork:0.14-uasf_backup_hardforkfrom
Conversation
…h the same return
rodasmith
reviewed
Aug 26, 2017
| return pindexLast->nBits; | ||
| } else { | ||
| // Go back by what we want to be 14 days worth of blocks | ||
| int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1); |
There was a problem hiding this comment.
(nit) Would this be more readable?
int nHeightFirst = pindexLast->nHeight + 1 - params.DifficultyAdjustmentInterval;
Author
There was a problem hiding this comment.
This isn't new code, just indented. Add ?w=1 to the files/diff URI might help.
But it's also part of #5, not this PR directly...
| int64_t nTryTime; | ||
| ++nMinTime; | ||
| while (nMinTime < nMaxTime) { | ||
| nTryTime = nMinTime + ((nMaxTime - nMinTime) / 2); |
There was a problem hiding this comment.
(nit) This may be more readable for the mean of min and max.
nTryTime = (nMinTime + nMaxTime) / 2;
Author
| consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5"); | ||
|
|
||
| consensus.HardforkTime = std::numeric_limits<int64_t>::max(); | ||
| consensus.nPowChangeTargetShift = 20; |
There was a problem hiding this comment.
Does this make it scale up by 2^20 whenever the previous period's blocks were too fast? I don't totally grok this constant.
Author
There was a problem hiding this comment.
It makes it 2^20 easier whenever the PoW algo changes.
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.
Note this is pre-SHA3 Keccak. It is not compatible with the final SHA3 standard.
I am making it a candidate in this form anyway, because it is already supported by BFGMiner.