Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgPoW CPU validation is not implemented #42

Open
solardiz opened this issue May 31, 2019 · 6 comments
Open

ProgPoW CPU validation is not implemented #42

solardiz opened this issue May 31, 2019 · 6 comments

Comments

@solardiz
Copy link
Contributor

As I understand, this ProgPoW tree relies on never finding a solution below target, or else it'd try to validate the solution on CPU as Ethash, which will fail. The fork at https://github.com/BitcoinInterestOfficial/ProgPOW does simply:

    // ProgPoW CPU validation is not implemented, override
    s_noeval = true;

Does any other tree implement lightweight ProgPoW validation on CPU?

[My c-progpow based off this ProgPoW tree's README.md currently only implements (cached-)full-DAG-based computation on CPU. Not lightweight.]

@solardiz
Copy link
Contributor Author

solardiz commented Jun 2, 2019

To answer my own question, there's lightweight ProgPoW validation on CPU in:

https://github.com/BitcoinInterestOfficial/BitcoinInterest/blob/master/src/crypto/progpow/ethash.cpp

(For whatever revision of ProgPoW they use, which is somewhat different from what we have here - at least the parameters are different.)

@AndreaLanfranchi
Copy link
Contributor

You can find a working (0.9.2) CPU validation here
https://github.com/chfast/ethash/blob/master/lib/ethash/progpow.cpp

@solardiz
Copy link
Contributor Author

@AndreaLanfranchi @chfast Would one of you perhaps integrate that code into this upstream ProgPoW tree?

@chfast
Copy link

chfast commented Jul 16, 2019

@AndreaLanfranchi @chfast Would one of you perhaps integrate that code into this upstream ProgPoW tree?

I'm not going to. I don't see a point of doing so.

@solardiz
Copy link
Contributor Author

"A point of doing so" could be to allow for testing of the GPU implementations with a realistic target, so that some hashes meeting target are found once in a while and would be validated with the CPU implementation. Right now, we have to add debugging output in order to test the GPU implementations, and this involves changing those implementations either to record many more of the computed hashes than usual or to record/print hashes for a specific global id. Both kinds of changes have the risk of affecting whether an implementation works correctly (especially in presence of potential compiler bugs), thereby potentially invalidating the testing results.

@chfast
Copy link

chfast commented Jul 16, 2019

I simply don't want to spend time on it. You can take code for the ethash library and "upstream" it yourself. If by "upstreaming" you mean to put it here and not to the ethminer this repo is a fork of.

Oh, by the way, the upstream ethminer already has the ethash library integrated. You can also simulate pool mining using GPU and verify results on CPU. Also, @AndreaLanfranchi has integrated ProgPoW GPU mining to ethminer, but this work was never merged. This last one we can reconsider.

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

No branches or pull requests

3 participants