What makes the blockchain immutable?

Beginner11/21/2022, 10:13:28 AM
Encryption algorithms, consensus mechanisms, and hash functions are the keys to ensuring the immutability of blockchains.

Blockchain is a decentralized, anonymous, open-source, and immutable distributed database. Once confirmed, on-chain transactions are permanently stored and cannot be altered. So what makes on-chain data immutable?

1. How is blockchain built?

Simply put, a blockchain consists of blocks and chains.

A block consists of a header and a body; where a header includes basic information about the block such as timestamp, version numbers, random nonce, the hash value of the previous block, Merkle root hash, and mining difficulty. Within the block body, there are packaged transactions signed with the private keys of wallet users. So, it is an asset transfer between users, but in addition to users, there is another transaction owned by the miner, and the transaction amount is the sum of the block reward plus all the fees paid by traders. k.

Each block header contains the hash of the previous block header and is linked together with timestamps and version numbers to form the blockchain.

How can blockchain be immutable?

The immutability of the blockchain means that the recorded transactions cannot be altered. After learning about the composition of the blockchain, immutability can be separated as the immutability of the block header and block body.

2.1 Block Header

The block header saves the hash value of the previous block's transaction information and timestamp, which is generated by the hashing algorithm, in the previous block. At this point, miners on the network calculate the hash of the block header using computational power, and whoever calculates it first can package the transaction and synchronize it to the entire network via broadcasting. If the data in the previous block changes, it will be inconsistent with the hash value of the original block and will not be confirmed by the next block.

2.2 Block Body

The immutability of the block body is determined by the hash function. The body contains many transactions linked together with Merkle trees. Any change in one of the transactions will change the hash value of the Merkle root, which will in turn cause the next block header to change. The hash function used by Bitcoin is the SHA-256 algorithm.

From here, it can be seen that tampering with transaction data on the blockchain will directly cause the root of the Merkle tree to change, and then the hash value of the next block header will also change, which would be illegitimate and require recalculation of the new block header hash. A change in the hash value of the new block header will cause a change in the next block header, which will result in data collapse that will not be accepted by the entire network.

In theory, more than 51% of the network's computing power is required to tamper with the data, but in a sufficiently robust network, a 51% attack is essentially impossible and not in the best interest of the attacker.

3. Differences from the central network

In a centralized network, the database is manipulated by a central authority, where new issuance, record alteration, and freezing of circulation can be manipulated. The central bank can add fiat money every year and freeze anyone's bank assets. And a centralized network only requires a single code sequence compared to a distributed database to alter the data.

In the blockchain, everyone participates in the accounting, all transaction records are synchronized with the entire network in time, and the same data is recorded in everyone's ledger without a central organization to manipulate it. Therefore, when someone tampers with their ledger, it will not affect the ledger records of others. At the same time, the entire network follows the principle that the majority obeys the minority to prevent data from being tampered with.

For instance, Bob borrows $500 from Tom. To prevent Bob from defaulting, Tom invites Nancy to act as an intermediary. However, Bob tells Nancy that he will give her $200 if she helps him cheat. Nancy declines the offer. In this case, Tom has no evidence or certificate other than accepting defeat, and Nancy plays the role of intermediary here.

If the whole process is synchronized in a broadcast format, everyone will remember that Bob owes Tom $500, and Bob will have no way to deny it.

4. What are blockchain applications?

Due to its immutable structure, blockchain is used in many areas such as electronic identity, supply chain, money transfer, and remittance. In e-identity, the authentication information of all individuals can be directly written to the block chain and broadcast to all nodes, thus ensuring the authenticity and accuracy of the information and preventing any changes. The same applies to the supply chain, where issues such as transparency, low efficiency, and information fraud can be effectively addressed.

Solution

The immutability of the blockchain solves the problems of data fraud, data tampering, and data opacity in traditional networks and is also widely implemented. However, it should be noted that this is not applicable to all blockchain networks such as consortial chains or private chains. Due to the small number of participants and semi-decentralized or centralized governance, the data in these chains cannot be absolutely immutable and transparent.

作者: Toby
譯者: Yuler
審校: Hugo, Echo
* 投資有風險,入市須謹慎。本文不作為 Gate.io 提供的投資理財建議或其他任何類型的建議。
* 在未提及 Gate.io 的情況下,複製、傳播或抄襲本文將違反《版權法》,Gate.io 有權追究其法律責任。

What makes the blockchain immutable?

Beginner11/21/2022, 10:13:28 AM
Encryption algorithms, consensus mechanisms, and hash functions are the keys to ensuring the immutability of blockchains.

Blockchain is a decentralized, anonymous, open-source, and immutable distributed database. Once confirmed, on-chain transactions are permanently stored and cannot be altered. So what makes on-chain data immutable?

1. How is blockchain built?

Simply put, a blockchain consists of blocks and chains.

A block consists of a header and a body; where a header includes basic information about the block such as timestamp, version numbers, random nonce, the hash value of the previous block, Merkle root hash, and mining difficulty. Within the block body, there are packaged transactions signed with the private keys of wallet users. So, it is an asset transfer between users, but in addition to users, there is another transaction owned by the miner, and the transaction amount is the sum of the block reward plus all the fees paid by traders. k.

Each block header contains the hash of the previous block header and is linked together with timestamps and version numbers to form the blockchain.

How can blockchain be immutable?

The immutability of the blockchain means that the recorded transactions cannot be altered. After learning about the composition of the blockchain, immutability can be separated as the immutability of the block header and block body.

2.1 Block Header

The block header saves the hash value of the previous block's transaction information and timestamp, which is generated by the hashing algorithm, in the previous block. At this point, miners on the network calculate the hash of the block header using computational power, and whoever calculates it first can package the transaction and synchronize it to the entire network via broadcasting. If the data in the previous block changes, it will be inconsistent with the hash value of the original block and will not be confirmed by the next block.

2.2 Block Body

The immutability of the block body is determined by the hash function. The body contains many transactions linked together with Merkle trees. Any change in one of the transactions will change the hash value of the Merkle root, which will in turn cause the next block header to change. The hash function used by Bitcoin is the SHA-256 algorithm.

From here, it can be seen that tampering with transaction data on the blockchain will directly cause the root of the Merkle tree to change, and then the hash value of the next block header will also change, which would be illegitimate and require recalculation of the new block header hash. A change in the hash value of the new block header will cause a change in the next block header, which will result in data collapse that will not be accepted by the entire network.

In theory, more than 51% of the network's computing power is required to tamper with the data, but in a sufficiently robust network, a 51% attack is essentially impossible and not in the best interest of the attacker.

3. Differences from the central network

In a centralized network, the database is manipulated by a central authority, where new issuance, record alteration, and freezing of circulation can be manipulated. The central bank can add fiat money every year and freeze anyone's bank assets. And a centralized network only requires a single code sequence compared to a distributed database to alter the data.

In the blockchain, everyone participates in the accounting, all transaction records are synchronized with the entire network in time, and the same data is recorded in everyone's ledger without a central organization to manipulate it. Therefore, when someone tampers with their ledger, it will not affect the ledger records of others. At the same time, the entire network follows the principle that the majority obeys the minority to prevent data from being tampered with.

For instance, Bob borrows $500 from Tom. To prevent Bob from defaulting, Tom invites Nancy to act as an intermediary. However, Bob tells Nancy that he will give her $200 if she helps him cheat. Nancy declines the offer. In this case, Tom has no evidence or certificate other than accepting defeat, and Nancy plays the role of intermediary here.

If the whole process is synchronized in a broadcast format, everyone will remember that Bob owes Tom $500, and Bob will have no way to deny it.

4. What are blockchain applications?

Due to its immutable structure, blockchain is used in many areas such as electronic identity, supply chain, money transfer, and remittance. In e-identity, the authentication information of all individuals can be directly written to the block chain and broadcast to all nodes, thus ensuring the authenticity and accuracy of the information and preventing any changes. The same applies to the supply chain, where issues such as transparency, low efficiency, and information fraud can be effectively addressed.

Solution

The immutability of the blockchain solves the problems of data fraud, data tampering, and data opacity in traditional networks and is also widely implemented. However, it should be noted that this is not applicable to all blockchain networks such as consortial chains or private chains. Due to the small number of participants and semi-decentralized or centralized governance, the data in these chains cannot be absolutely immutable and transparent.

作者: Toby
譯者: Yuler
審校: Hugo, Echo
* 投資有風險,入市須謹慎。本文不作為 Gate.io 提供的投資理財建議或其他任何類型的建議。
* 在未提及 Gate.io 的情況下,複製、傳播或抄襲本文將違反《版權法》,Gate.io 有權追究其法律責任。
即刻開始交易
註冊並交易即可獲得
$100
和價值
$5500
理財體驗金獎勵!