Optimize hashing of internal sha256d miner.#871
Optimize hashing of internal sha256d miner.#871codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Conversation
|
I need to run some tests to make sure there isn't changes to the hash during a run (doesn't look like it from code inspection). While I'm doing that check:
This function needs to change, since it's specific to Sha256D and isn't a generic GetDataHash(). |
src/primitives/block.cpp
Outdated
| uint256 CBlockHeader::GetDataHash() const | ||
| { | ||
| CSha256dDataInput input(*this); |
There was a problem hiding this comment.
Since this is specific to Sha256; change the GetDataHash() to be reflective of that
There was a problem hiding this comment.
uint256 CBlockHeader::GetSha256dMidstate() ?
There was a problem hiding this comment.
Sure; that works. Use your discretion; but just as long as it is identifiable as a sha256 function [I figured GetSha256dDataHash(), but whatever makes sense I'm good with.
codeofalltrades
left a comment
There was a problem hiding this comment.
ACK 9b07d64
miner changes work. I ran it on the testnet for 24 hours.
sample block: http://testnet-explorer.codeofalltrades.com/block/c154ad36bffe1758e441fa2be2dfdb99bd6f30ec58b7742d167f711bb1e41590
|
@barrystyle just `rebase -i HEAD~2' and fixup the second one so that it's only one commit, and we'll send it on to QA. Also, add a stealth address. We don't have a lot to offer, but we'll get you something for a bounty. |
Since the datahash is not likely to change much between blocks (other than work refresh), we can calculate it once and reuse the value. Average hashrate beforehand on 4core vps was 4mh, averages around 5.5-6mh with blocks successfully solved on devnet.
5650b36 to
b3603ed
Compare
|
Appreciated, but theres no need.. enjoy! |
Since the datahash is not likely to change much between blocks (other than
work refresh), we can calculate it once and reuse the value.
Average hashrate beforehand on 4core vps was 4mh, averages around 5.5-6mh with
blocks successfully solved on devnet.