-
Notifications
You must be signed in to change notification settings - Fork 25
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
Documentation #7
Comments
Hey Robinson-George, thanks for the questions, some of them are algorithm dependent while others are implementation so I'll try to go through them one by one. The W prefix is there in the code to avoid confusion with things such as loop variables; I'll just use N and K here.
Yes - The Equihash algorithm states that N must be divisible by (K+1). NDIGITS just stores the K+1 value when calculating DIGITBITS N/(K+1).
You could make NDIGITS another divisor or N and could still run Equihash but that would be for anotehr set of parameters which would not be compatible with the (210,9) parameters. For example you could build a system using (210,6) as 210 is divisible by 7. However, due to the changed parameters these systems PoW algorithms would not be compatible with each other,
The buckets are used to sort hashes into candidates and save work in future rounds. If you stored all hashes in round 0 in a bucket with 1<<DIGITBITS slots, then in the next round you would have to compare every single pair (most failing to xor to 0 over DIGITBITS). By sorting the candidates we ensure we only continue processing hashes which have the potential to generate a solution. However the bucket sort is an implementation detail, there are other implementations which don't necessarily sort hashes the same way. At the moment I don't believe there are any other 210,9 implementations out there but there are various implementations for 200,9 and 192,7. BTW, if you're not sure if a question should be an issue here you can always post any questions up on the forum https://forum.aion.network/ |
Is this a good place to ask?:
Must NDIGITS be equal to (WK+1) ?
What would happen if NDIGITS was another divisor of WN ?
Also, why are buckets needed at all, if in Rounds1, 2, 3 ...etc, all DIGITBITS are always XOR'ed anyway ?
What would happen in Round0 if RESTBITS == DIGITBITS and BUCKBITS == 0 ?
...in other words, what would change in Round0 if there was only 1 bucket and (1<<DIGITBITS) number of slots ?
The text was updated successfully, but these errors were encountered: