B
B
BoyFromDubai2022-04-14 23:33:48
Cryptography
BoyFromDubai, 2022-04-14 23:33:48

How is the correctness of transactions constantly checked in the blockchain?

Let's say we have n blocks in the blockchain. In the header of each is the root of the Merkle tree regarding transactions. The attacker somehow changed the transaction data, but why did the hash of the transaction and the hash of the Merkle tree automatically change along with this?
I understand that hash(x) != hash(y), but what is responsible for making sure the hashes in the block are correct?
A transaction was created, the hash function was called 1 time and a hash was created. But why does the hash automatically change when the transaction data is changed, if only the data block about the transaction itself was changed? Or am I not fully understanding how this works in practice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2022-04-15
@vabka

Anyone can independently check the correctness of a block by calculating its hash and comparing it with the specified one - this is a very simple operation that is performed on any modern computer in a fraction of a second.
Accordingly, if the hashes do not match, then the data is corrupted or someone is trying to deceive someone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question