<p>I wrote a python program to calculate the block hash from the version, prev_block, mrkl_root, timestamp, bits, and nonce. You can see it <a href="https://bitcoin.stackexchange.com/questions/46021/bitcoin-mining-block-structure/46024#46024">here</a>.</p>

CC BY-SA 3.0
2017-07-11T18:50:06.707Z
2017-07-11T18:50:06.707Z
Nick ODell
<p>This is my first question on this community (the 100 points were just given to me by the site). The information given is from a block i found looking from the docs <a href="https://blockchain.info/api/blockchain_api" rel="nofollow noreferrer">api</a>. What am supposed to do with the nonce and the hashes in this block to check <code>SHA256(A)==SHA256(B+nonce)</code> or is this terribly wrong and the data here cannot give me that answer.</p>

<pre><code>{
    "hash":"0000000000000bae09a7a393a8acded75aa67e46cb81f7acaa5ad94f9eacd103",
    "ver":1,
    "prev_block":"00000000000007d0f98d9edca880a6c124e25095712df8952e0439ac7409738a",
    "mrkl_root":"935aa0ed2e29a4b81e0c995c39e06995ecce7ddbebb26ed32d550a72e8200bf5",
    "time":1322131230,
    "bits":437129626,
    "nonce":2964215930,
    "n_tx":22,
    "size":9195,
    "block_index":818044,
    "main_chain":true,
    "height":154595,
    "received_time":1322131301,
    "relayed_by":"108.60.208.156",
    "tx":[--Array of Transactions--]
{
</code></pre>

<mining-theory><sha256><nonce>
How to check two hashes are equal using block data and the nonce?
George Pamfilis
# How to check two hashes are equal using block data and the nonce?

(Asked by: username_0 on 2017-07-11)

This is my first question on this community (the 100 points were just given to me by the site). The information given is from a block i found looking from the docs [api](https://blockchain.info/api/blockchain_api). What am supposed to do with the nonce and the hashes in this block to check `SHA256(A)==SHA256(B+nonce)` or is this terribly wrong and the data here cannot give me that answer.

```
{
    "hash":"0000000000000bae09a7a393a8acded75aa67e46cb81f7acaa5ad94f9eacd103",
    "ver":1,
    "prev_block":"00000000000007d0f98d9edca880a6c124e25095712df8952e0439ac7409738a",
    "mrkl_root":"935aa0ed2e29a4b81e0c995c39e06995ecce7ddbebb26ed32d550a72e8200bf5",
    "time":1322131230,
    "bits":437129626,
    "nonce":2964215930,
    "n_tx":22,
    "size":9195,
    "block_index":818044,
    "main_chain":true,
    "height":154595,
    "received_time":1322131301,
    "relayed_by":"108.60.208.156",
    "tx":[--Array of Transactions--]
{

```

**Tags:** mining-theory, sha256, nonce


---

## 1 answers

### Answer by username_1 on 2017-07-11. Score: 1 | Accepted answer

I wrote a python program to calculate the block hash from the version, prev\_block, mrkl\_root, timestamp, bits, and nonce. You can see it [here](https://bitcoin.stackexchange.com/questions/46021/bitcoin-mining-block-structure/46024#46024).


---

