<blockquote>
  <p>Obviously, the input of the hash function is the pointer to some data
  in memory.</p>
</blockquote>

<p>No.</p>

<p>Each block consists of header (80 bytes) and body (transactions). </p>

<p>Hash function hashes 80 bytes input giving 32 bytes output.</p>

<p>The input of the hash function of block N is <strong>the entire header</strong> of block N-1 (80 bytes). These 80 bytes are hashed and the resulting hash (of size 32 bytes) is stored in the block N header (filling the part of its 80bytes).</p>

<p>The hash of N-1 header in block N header proves (provides integrity) the position of block N: that it comes behind block N-1 in the blockchain.</p>

<hr>

<p>Note there is another hashing process happening in each block, hashing of block's transactions producing so called Merkle root that is also placed in the header and provides integrity of block's transactions.</p>

CC BY-SA 3.0
2017-11-20T19:18:50.717Z
2017-11-20T19:24:30.667Z
2017-11-20T19:24:30.667Z
croraf
<p>The hashes are not of addresses, they are of blocks. The "hash pointers" (in the blockchain, those are just hashes written into the header of a block, it doesn't actually point to anything) are the hash of the block that precedes the block that the hash is in.</p>

CC BY-SA 3.0
2017-11-20T15:21:52.087Z
2017-11-20T15:21:52.087Z
Ava Chow
<p>The term "pointer" may not be the best in this case, since people tend to think that means "pointer to memory address".  It does not.  Here, the term "pointer" is being used in the data structure sense, not the variable primitive.</p>

<p>A better term might be <em>key</em>, such as a unique identifier in a database.  That actually <em>is</em> what is meant when people refer to a hash pointer.  The hash is an identifier that can be used to uniquely select a transaction in a database.</p>

CC BY-SA 3.0
2017-11-20T15:27:06.147Z
2017-11-20T15:27:06.147Z
Jestin
<p>I am wondering how hash pointers are implemented in reality. Currently, I am reading <a href="http://learningspot.altervista.org/hash-pointers-and-data-structures/" rel="nofollow noreferrer">this article</a> about hash pointers. According to this website a hash pointer allows both to request data and to verify its integrity. The following picture is supposed to illustrate the basic structure of a blockchain<a href="https://i.sstatic.net/9nL6J.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9nL6J.png" alt="enter image description here"></a></p>

<p>Obviously, the input of the hash function is the pointer to some data in memory. At the same time the hash is supposed to be the hash of the stored data. How is this possible? I can't imagine to interpret hashes of data as addresses.</p>

CC BY-SA 3.0
2017-11-20T14:50:10.467Z
I'm not sure you are asking the exact same thing, but I think this question is close: https://bitcoin.stackexchange.com/questions/44213/hash-versus-hash-pointer
Jestin
CC BY-SA 3.0
2017-11-20T14:52:44.083Z
I've already read this question, but unfortunately it does not answer my question. There is no hint how pointers, hashes and data correlate. How can the hash of arbitrary data used as pointers?
null
<blockchain><hash>
Hash pointers: Are hashes of data used as addresses?
null
# Hash pointers: Are hashes of data used as addresses?

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

I am wondering how hash pointers are implemented in reality. Currently, I am reading [this article](http://learningspot.altervista.org/hash-pointers-and-data-structures/) about hash pointers. According to this website a hash pointer allows both to request data and to verify its integrity. The following picture is supposed to illustrate the basic structure of a blockchain[![enter image description here](https://i.sstatic.net/9nL6J.png)](https://i.sstatic.net/9nL6J.png)

Obviously, the input of the hash function is the pointer to some data in memory. At the same time the hash is supposed to be the hash of the stored data. How is this possible? I can't imagine to interpret hashes of data as addresses.

**Tags:** blockchain, hash

> **Comments:**
> **username_1**: I'm not sure you are asking the exact same thing, but I think this question is close: https://bitcoin.stackexchange.com/questions/44213/hash-versus-hash-pointer  
> **username_0**: I've already read this question, but unfortunately it does not answer my question. There is no hint how pointers, hashes and data correlate. How can the hash of arbitrary data used as pointers?  

---

## 3 answers

### Answer by username_2 on 2017-11-20. Score: 1

> Obviously, the input of the hash function is the pointer to some data
> in memory.

No.

Each block consists of header (80 bytes) and body (transactions).

Hash function hashes 80 bytes input giving 32 bytes output.

The input of the hash function of block N is **the entire header** of block N-1 (80 bytes). These 80 bytes are hashed and the resulting hash (of size 32 bytes) is stored in the block N header (filling the part of its 80bytes).

The hash of N-1 header in block N header proves (provides integrity) the position of block N: that it comes behind block N-1 in the blockchain.

---

Note there is another hashing process happening in each block, hashing of block's transactions producing so called Merkle root that is also placed in the header and provides integrity of block's transactions.


---

### Answer by username_3 on 2017-11-20. Score: 1

The hashes are not of addresses, they are of blocks. The "hash pointers" (in the blockchain, those are just hashes written into the header of a block, it doesn't actually point to anything) are the hash of the block that precedes the block that the hash is in.


---

### Answer by username_1 on 2017-11-20. Score: 1

The term "pointer" may not be the best in this case, since people tend to think that means "pointer to memory address". It does not. Here, the term "pointer" is being used in the data structure sense, not the variable primitive.

A better term might be *key*, such as a unique identifier in a database. That actually *is* what is meant when people refer to a hash pointer. The hash is an identifier that can be used to uniquely select a transaction in a database.


---

