Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Blockhash and state root changes #96
referenced this issue
Apr 26, 2016
This was referenced
Mar 3, 2017
To elaborate, I would like to offer a few use-cases:
Secondly, and much more importantly, is in the application of verifiable off-chain computation networks such as true-bit. The on-chain verification process would in many cases rely on a specific "snapshot of state". It would not be possible to verify against a moving target. I would imagine the registration of a job in true-bit might require a specific block number, or the ability to lock in a block number once certain conditions are met. That block number would include a state-root to provide merkle proofs against during the interactive verification process.
@vbuterin another use case is for logs. I have considered cases where logs are nearly sufficient over expensive storage. However maybe the log needs to be read in very rare cases(1 out of every million for instance). If block headers are available, it would be possible to "escalate" a log into something that can be read by a contract by presenting a merkle proof verification of its existence.
The rationale is that if you allow each block to access literally any previous block, then storage blows up too much. That said, there is a compromise where you can access the last 256 blocks, then every 256th block up to the last 65536th block, then every 65536th block up to the last 16777216th block, and you may as well stop there. This let you access any previous block in 3 hops, and only takes up a maximum of 768 storage slots in the state.