Reading on EtHash, I was thinking if it is possible to verify the current Ethereum Proof Of Work by a smart contract. There is an instruction SHA3, which computes 256-bit hash, but EtHash uses 512-bit hash. Was this discrepancy intentional or just an oversight? Is it possible to compute one from another somehow?

I know that verifying PoW in the contract might be expensive, but it could be used just as a response to a challenge.


It seems impossible to do so, because Ethash requires a 16 MB pseudorandom cache. This would be expensive to store on the blockchain, as each Ethereum transaction only holds a maximum of 89kB (3 million gas).

| improve this answer | |
  • 1
    The cache wouldn't need to be stored in the blockchain; it could be constructed (expensively) in instance memory. – Nick Johnson Mar 29 '16 at 6:59

I think it is difficult because the time of doing RAM(Random Access Memory) accounts for the most part of Ethash.

| improve this answer | |
  • You think? Do you have any statistics or evidence to back this up? – Chenmunka Aug 23 '17 at 10:06

you can add new opcode in EVM to implement this function,but i have a problem in how to compile correctly in solidity. i will appreciate it if you show your method to prove your ethash's nonce in contract. https://stackoverflow.com/questions/52422805/how-verifies-the-nonce-produced-by-ethash-through-contract-add-new-opcode-in

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.