## Blockhash company comparison Scope: 1- Deploy/call a smart contract that stores the blockhash from BLOCKHASH opcode ![image](https://hackmd.io/_uploads/r1us6C3Ep.png) 2- Check returned block hash from rpc call 3- Check block hash at explorers 4- Compute block hash from block header params: ``` const rlp = ethers.utils.RLP.encode([ res.parentHash, res.sha3Uncles, res.miner, res.stateRoot, res.transactionsRoot, res.receiptsRoot, res.logsBloom, formatNotOddData(res.difficulty), formatNotOddData(res.number), formatNotOddData(res.gasLimit), formatNotOddData(res.gasUsed), res.timestamp, res.extraData, res.mixHash, res.nonce, formatNotOddData(res.baseFeePerGas),// EIP 1559 res.withdrawalsRoot // EIP 4895 ]); const hash = ethers.utils.keccak256(rlp); ``` ### Optimism Block number: 17660461 BLOCKHASH opcode response: 0x02bb095abfc7440c951cf0fffc37384d908241976bcbed57c612485400883da0 BLOCKHASH in explorer: [0x02bb095abfc7440c951cf0fffc37384d908241976bcbed57c612485400883da0](https://goerli-optimism.etherscan.io/block/17660461) BLOCKHASH RPC response:0x02bb095abfc7440c951cf0fffc37384d908241976bcbed57c612485400883da0 Computed BLOCKHASH: 0x02bb095abfc7440c951cf0fffc37384d908241976bcbed57c612485400883da0 ### Arbitrum Block number: 1465548 / 4755724 BLOCKHASH opcode response: 0x1db91e1e81fe0b483256e2b4b9489cbfbef19a5038107ba7dafdfbac6c80377c BLOCKHASH in explorer: [0xbdccf08b3057b134990ca807c6a974d39befe2bfa56fe71e1f323959b1ac590c](https://sepolia-explorer.arbitrum.io/block/1465548/transactions) BLOCKHASH RPC response:0xbdccf08b3057b134990ca807c6a974d39befe2bfa56fe71e1f323959b1ac590c Computed BLOCKHASH: 0xbdccf08b3057b134990ca807c6a974d39befe2bfa56fe71e1f323959b1ac590c ![image](https://hackmd.io/_uploads/BktPuyRV6.png) ### Scroll Block number: 2369865 BLOCKHASH opcode response: 0xa7728333b701a8fa0bfbda57409adc45b60ee6ed9151811b50024a0210a8e8cb BLOCKHASH in explorer: [ 0x9cff7a85b1000facb396d4cfb378a0e0e2cadc46bec409d0ffcf89eaa697a6c7](https://sepolia.scrollscan.dev/block/2369865) BLOCKHASH RPC response:0x9cff7a85b1000facb396d4cfb378a0e0e2cadc46bec409d0ffcf89eaa697a6c7 Computed BLOCKHASH: 0x9cff7a85b1000facb396d4cfb378a0e0e2cadc46bec409d0ffcf89eaa697a6c7