Context. Access to the block hash in smartcontracts is supported by many blockchains. For example, in solidity language there is function blockhash(uint blockNumber)
allowing to get hash of some block in the past by it’s number. This opportunity to access blockhashes is used to bring an additional source of randomness. It can be utilized in combination with commit-reveal scheme to ensure that the block producer can’t affect the result of the random generation.
The problem. In Mina smartcontract it’s impossible to prove some blockhash correctness.
Solution. Our proposal is to add a field for block body hashes into the GraphQL schema. The block body hashes can be used to re-calculate blockhash in smartcontracts and prove it’s correctness. This change will not impact the protocol itself but will provide developers with additional tools and capabilities.