<p>It does not!</p>

<p>Next block contains a reference to previous block header hash.</p>

<p>Let's say the blocks are ordered as <code>1&lt;-2&lt;-3&lt;-4&lt;-5&lt;-</code> with block 1 being the first block in the chain (so called genesis block).</p>

<p>Block 2 header contains a reference to block 1 header hash.</p>

<p>Block 3 header contains a reference to block 2 header hash.</p>

<p>Block 4 header contains a reference to block 3 header hash, and so on.</p>

<p>If someone changes block 3 header block 4 will not point to that block's header any more, and the part of the chain -4&lt;-5&lt;-6&lt;-... will be invalid.</p>

<p>Each block's header contains a construct (called Merkle root) which is derived from all transactions. Thus changing a transaction in block 3 will make Merkle root in the header of block 3 invalid and the attacker must also change that. Meaning the header will change and thus block 3 header's hash will change. Thus block 4 header won't point to block 3 header hash any more.</p>

<p>NOTE: On the other hand block 3 will also be invalid with respect to its required target threshold but this is another issue.</p>

CC BY-SA 3.0
2017-11-09T18:37:34.110Z
2017-11-09T18:56:17.203Z
2017-11-09T18:56:17.203Z
croraf
<blockquote>
  <p>Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth.</p>
</blockquote>

<p>In the statement that you have quoted, block three is the oldest block. It has been first buried under block two and, then block one.</p>

CC BY-SA 3.0
2018-02-08T08:45:35.780Z
2018-02-08T08:45:35.780Z
Willtech
<p>I am reading this <a href="https://blockgeeks.com/guides/what-is-hashing/" rel="nofollow noreferrer">article</a>, within which it mentions that </p>

<p><strong>"Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth."</strong></p>

<p>And I do not understand if a hacker attacks block 3 and try to edit the transaction data within it, how would this affect the hash stored in block 2? And hash of what is stored in block 2 ? </p>

<p>Can someone kindly clarify for me please ? I am just getting confused. </p>

CC BY-SA 3.0
2017-11-09T16:28:56.717Z
The author of article is wrong. Try to read more authoritative sources
amaclin
CC BY-SA 3.0
2017-11-09T16:33:55.457Z
Can you kindly point me to some authoritative sources please ?
mynameisJEFF
<hash><attack>
How does changing transaction data in a block change the hash of previous block?
mynameisJEFF
# How does changing transaction data in a block change the hash of previous block?

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

I am reading this [article](https://blockgeeks.com/guides/what-is-hashing/), within which it mentions that

**"Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth."**

And I do not understand if a hacker attacks block 3 and try to edit the transaction data within it, how would this affect the hash stored in block 2? And hash of what is stored in block 2 ?

Can someone kindly clarify for me please ? I am just getting confused.

**Tags:** hash, attack

> **Comments:**
> **username_1**: The author of article is wrong. Try to read more authoritative sources  
> **username_0**: Can you kindly point me to some authoritative sources please ?  

---

## 2 answers

### Answer by username_2 on 2017-11-09. Score: 1 | Accepted answer

It does not!

Next block contains a reference to previous block header hash.

Let's say the blocks are ordered as `1<-2<-3<-4<-5<-` with block 1 being the first block in the chain (so called genesis block).

Block 2 header contains a reference to block 1 header hash.

Block 3 header contains a reference to block 2 header hash.

Block 4 header contains a reference to block 3 header hash, and so on.

If someone changes block 3 header block 4 will not point to that block's header any more, and the part of the chain -4<-5<-6<-... will be invalid.

Each block's header contains a construct (called Merkle root) which is derived from all transactions. Thus changing a transaction in block 3 will make Merkle root in the header of block 3 invalid and the attacker must also change that. Meaning the header will change and thus block 3 header's hash will change. Thus block 4 header won't point to block 3 header hash any more.

NOTE: On the other hand block 3 will also be invalid with respect to its required target threshold but this is another issue.


---

### Answer by username_3 on 2018-02-08. Score: 1

> Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth.

In the statement that you have quoted, block three is the oldest block. It has been first buried under block two and, then block one.


---

