-
Notifications
You must be signed in to change notification settings - Fork 84
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
Tune ProgPoW for similar hashrate to Ethash's #36
Comments
While I agree with you that the differences in numbers opens questions, I disagree about a need to artificially inflate or 'trick' the numbers. Lower hashrate can easily be explained to people through education and adding tricks feels disingenuous. From the other angle, what if the hashrate was actually higher? Would you have worked to lower it? ;-) I think the 3rd party analysis should absolutely evaluate the switchover effects on the difference in hashrate. I've brought this up before in the chats and was told it shouldn't be an issue, but I'd still like to see that simulated on a testnet. There might be a very small window of opportunity for someone to do something nefarious there. I'd also like to see the testing of |
First of all, please, describe in details meaning of LANES? |
@lookfirst I disagree it'd be "artificially inflate or 'trick' the numbers". They're arbitrary as they are. Right now, they're based on keeping Then you go on to say you do have concerns about the switchover to different hashrate. This is a reason in favor of tuning ProgPoW to have a similar hashrate. Finally, you bring up a valid point about using this as a test of hard-forking to a different hashrate PoW, where this experience could be reused later. It is possible that some other future PoW wouldn't be easily tunable to match the previous PoW's hashrate. @vasilevskykv I find your questions irrelevant to this discussion. I didn't mention lanes, and the tuning I suggested doesn't involve any change related to lanes. That said, they're not PCIe lanes, but are necessary parameters of the algorithm related to other properties of the GPU hardware (unrelated to PCIe). |
I think the primary reason to possibly not bother tuning ProgPoW to match Ethash's hashrate on GPUs is that by the time Ethereum possibly switches to ProgPoW it will probably be mined largely on ASICs rather than GPUs, so there will be a major drop in hashpower regardless of how the two PoWs' hashrates compare to each other on GPU. That said, configuring ProgPoW to match Ethash's total data transfer from DAG would make sense to me even under such circumstances, and the disappearance of ASICs would need to be dealt with separately either way (tricky - e.g., might require a dual-PoW transition period, with its associated risks). |
It seems like more than just that one parameter. You also bring up a very good point that I'd love @ifdefelse to provide clarity on... why was the parameter changed from the Ethash setting?
Thank you for calling me out on that. You're indeed correct there. What I'm thinking though is that the testing and potential code changes for a large change in hashrate needs to happen regardless. For example, it gets deployed and some bug causes all the AMD cards to stop working. |
For hashrate tuning, it is just |
You're right that a simple parameter tune could make the ProgPoW hashrate pretty close to Ethash. Ethash does 64 reads each of 128 bytes, reading 8kb of memory DAG total. ProgPoW keeps the same number of reads at 64 but doubles the size to 256 bytes in order to be efficient on GDDR5x and GDDR6 memories. This results in reading 16kb of DAG total and ~1/2 the hash rate. The read count could be dropped to 32 with each read being 256 bytes to retain the 8kb of DAG read and nominally similar hashrates. The original ethash documentation says: https://github.com/ethereum/wiki/wiki/Ethash-Design-Rationale
The current ProgPoW spec cuts the keccak size in half while doubling the memory accessed, making the keccak effectively 1/4th as important. This was an intentional design choice to prevent acorn-style offloading of the keccak. Reducing the access count to 32 would only make the keccak 1/2 as important, which is still better than Ethash. We think doubling the read size to 256 bytes is important for now-current memory technologies. The pros for the two choices are: 64 reads:
32 reads:
|
All good points. I think it'd take something inbetween 32 and 64 to have "nominally the same hashrates as ethash" due to ProgPoW's increased memory bandwidth usage. Maybe 40 or so. |
I remember once trying to pick a certain cycle length PoW parameter between 32 and 64... |
@shemnon Discusses this here: https://ethereum-magicians.org/t/eip-progpow-a-programmatic-proof-of-work/272/13 |
The doubling of the required memory bandwith alone makes it impossible to match the EthHash hashrate on the same hardware. |
We might want to either tune ProgPoW to produce a similar hashrate to what Ethash produces on same currently relevant hardware and at same DAG size, or document a rationale why we don't.
Right now, ProgPoW produces hashrate that is numerically significantly below Ethash's. This may require hard-coding a difficulty scaling factor to apply on a switchover from Ethash to ProgPoW, and it has a psychological effect of making ProgPoW appear "worse".
Why don't we reduce
PROGPOW_CNT_DAG
to a level where the hashrates are similar, effectively hard-coding this scaling factor into ProgPoW itself? I understand they can't be exactly the same since the current hashrate ratio between the two hashes varies across different GPUs, but at least we can reduce the difference between ProgPoW's and Ethash's numeric hashrate and eliminate the need for an external scaling factor.To support the trick I described in #26 (comment) we might have some constraints on optimal values for
PROGPOW_CNT_DAG
- e.g., it'd need to be a multiple of 4 in order to avoid fetching a smaller last group of blocks in the example in that comment - but this still leaves us with a lot of freedom for adjusting the value.The text was updated successfully, but these errors were encountered: