Skip to content

PoW algorithm candidate: Keccak#10

Open
luke-jr wants to merge 13 commits intoBitcoinHardfork:0.14-uasf_backup_hardforkfrom
luke-jr:0.14-bak_hf+powalgo_keccak
Open

PoW algorithm candidate: Keccak#10
luke-jr wants to merge 13 commits intoBitcoinHardfork:0.14-uasf_backup_hardforkfrom
luke-jr:0.14-bak_hf+powalgo_keccak

Conversation

@luke-jr
Copy link
Copy Markdown

@luke-jr luke-jr commented Jul 15, 2017

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.

Comment thread src/pow.cpp
return pindexLast->nBits;
} else {
// Go back by what we want to be 14 days worth of blocks
int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) Would this be more readable?

int nHeightFirst = pindexLast->nHeight + 1 - params.DifficultyAdjustmentInterval;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Comment thread src/chain.cpp
int64_t nTryTime;
++nMinTime;
while (nMinTime < nMaxTime) {
nTryTime = nMinTime + ((nMaxTime - nMinTime) / 2);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) This may be more readable for the mean of min and max.

nTryTime = (nMinTime + nMaxTime) / 2;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment on PR #5 stuff on PR #5

Comment thread src/chainparams.cpp
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5");

consensus.HardforkTime = std::numeric_limits<int64_t>::max();
consensus.nPowChangeTargetShift = 20;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes it 2^20 easier whenever the PoW algo changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants