I've been following ethereum since the very beginning silently. This is my first post. I am not a computer scientist, please bear this in mind when replying. thanks. -I am however a mathematician so feel free to get technical
From the start I was confused as to how to assign ether/gas to contract execution. How do we determine how much computation something took? Surely there are many ways to calculate the same result? ... but nobody seemed to raise this issue so I put it down to my own inexperience.
But now I saw the recent blog post on long range attacks ( http://blog.ethereum.org/2014/05/15/long-range-attacks-the-serious-problem-with-adaptive-proof-of-work/
) and this reawakened my question. The example given is instructive:
i = 0
while sha3(i) != 0x8ff5b6afea3c68b6cd68bd429b9b64a708fa2273a93ea9f9e3c763257affee1f:
i = i + 1
one way to solve this is brute force, the other is knowing the answer beforehand. There is no way to know how long someone took to solve this.
It has also been noted in discussions about "usefull POW" that we cannot use things like [email protected]
or [email protected]
or similar because we cannot easily verify the results without repeating the work entirely. It is not mathematical enough like sha256 or finding prime numbers is. So here is another question:
If we wanted to avoid the problem sketched above we might want to have everyone do the same calculations in-the-exact-same-way (this is how I understand the comment in the blog about "requiring a tree-hashed computational stack trace") but then are we not in [email protected]
type territory where the only way to verify someone's work is to repeat it?
In bitcoin it takes long to find a block, but a new block's validity is quick to check. Here, how would I be able to check the validity of the work without repeating all of it?
Maybe I am getting POW confused with state transition or something, but can someone help clarify this in my head?