3 ms·
Is there a way to exploit the miner scripts? I mean in a way: Never trust the client? If the proof is calculated on the client, how does the server confirm that
by einrealist 9y ago
Is there a way to exploit the miner scripts? I mean in a way: Never trust the client? If the proof is calculated on the client, how does the server confirm that the proof is correct?
- slig 9y agoGenerally, checking the solution is trivial. Hashing billions of hashings to find what you want is want takes resources.
- einrealist 9y agoSo when I intercept the script and send a bad proof back, it would not do any harm? So no https://xkcd.com/327/ https://xkcd.com/327/ for the bad miners? I guess, we need browser extensions that just send the correct proof to my own wallet then?
- slig 9y agoThe bad proof can be trivially checked and discarded. If you want the results of the mining it makes more sense to run yourself with a native miner than run on the browser. This coinhive thing only makes sense [to run on a browser] because they're exploiting the resources (hardware and electricity) from the visitors.
- Roshie5u 9y agoIt is true for checking final solution, but what in case of partial results? I am not sure about monero but with BTC I could claim I checked range assigned to me and found no solutions. I guess mining pools have solved it in some way. edit: I see that Coinhive pays only for solved hashes, so there is no way to "harm" them, and for website owner it makes no difference if hashes are not computed at all or invalid results are submitted.
- cbarrick 9y ago> how does the server confirm that the proof is correct? The point of proof-of-work algorithms is to be hard to compute but easy to verify. As a simplified example, a proof-of-work might be to take some input and find a corresponding salt that leads to a sha256 with 10 leading zeros. The user works hard to find that salt (the proof-of-work) using some brute force search, but the server easily verifies that the proof is correct because checking a sha256 is easy. So the proof is verifiable by the definition of the algorithm.