-
Notifications
You must be signed in to change notification settings - Fork 513
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
Inconsistency between yellow paper and Ethash wiki #517
Comments
I'll compare both with implementations. |
Wait, the formula in YP doesn't even terminate. |
See ethereum#517 This has to be ported to all protocol versions.
@pgebal I realized something. Whichever definition you choose, they result in the same cache size, because no even number is prime. |
Whenever (sz / HASH_BYTES) is an odd number at least three, the loop
runs even times. Say So, the loop can be optimized, merging every two steps, into
|
You are right. Thank you. |
I keep my pull requests open. Different formulations are confusing. Thank you for pointing them out. |
Hi,
Please take a look at eq. 230 in yellow paper and Ethash wiki implementation of get_cache_size function. If the function was implemented as in yellow paper we would have
sz -= HASH_BYTES
instead ofsz -= 2 * HASH_BYTES
. ethereumj and pyethereum implementations follow Ethash wiki. Which version is correct? Should I follow Ethash wiki or yellow paper when implementing Ethash?The text was updated successfully, but these errors were encountered: