6

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.

rethsid
  • 1,898
  • 3
  • 18
  • 30

3 Answers3

3

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).

Loi.Luu
  • 2,103
  • 3
  • 13
  • 16
  • 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 06:59
0

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

0

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