I have gone through your idea implemented in EventStorage.sol and found that you rely on blockhash()
|
require(parsedHeader.derivedHash == block.blockhash(parsedHeader.blockNumber)); |
In other words you assume that blockhash() will always return a correct value for any correct block number. But at the same moment I can read in Solidity documentation that
The block hashes are not available for all blocks for scalability reasons.
You can only access the hashes of the most recent 256 blocks, all other values will be zero.
(https://solidity.readthedocs.io/en/v0.4.24/units-and-global-variables.html#block-and-transaction-properties)
So, judging on this your code will work only if the block we are referring has the number greater than (N-256) where N is the current block number. Is it known limitation or Solidity documentation is obsoleted?
I have gone through your idea implemented in
EventStorage.soland found that you rely onblockhash()Ethereum/EventStorage.sol
Line 166 in e04501d
In other words you assume that
blockhash()will always return a correct value for any correct block number. But at the same moment I can read in Solidity documentation that(https://solidity.readthedocs.io/en/v0.4.24/units-and-global-variables.html#block-and-transaction-properties)
So, judging on this your code will work only if the block we are referring has the number greater than (N-256) where N is the current block number. Is it known limitation or Solidity documentation is obsoleted?