Bitcoin Forum
November 08, 2024, 09:44:53 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to tamper with the last block?  (Read 168 times)
CryptoEnthused (OP)
Member
**
Offline Offline

Activity: 190
Merit: 15


View Profile
March 04, 2018, 03:10:50 PM
 #1

Well, as it's known, every block has a hash pointer pointing to the hash of a previous block. Suppose we have block 1, block 2 and block 3. Block 3 has a hash pointer to the hash of the block 2, the block 2 has a hash pointer to the hash of the block 1. That means that in order to change any data in the block 1 or 2, it requires to change block 3. It seems very hard and the difficulty increases drastically with every new block added to the blockchain. But how hard is it to change just one last block while there is no hash pointer pointing to it? Suppose the block 3 has been mined mined just now and the block 4 hasn't been mined yet. Is there a chance to tamper with the block 3?
BlackBoxRecords
Member
**
Offline Offline

Activity: 280
Merit: 15

Pool of Stake


View Profile
March 04, 2018, 04:28:02 PM
Merited by OgNasty (1)
 #2

Well, as it's known, every block has a hash pointer pointing to the hash of a previous block. Suppose we have block 1, block 2 and block 3. Block 3 has a hash pointer to the hash of the block 2, the block 2 has a hash pointer to the hash of the block 1. That means that in order to change any data in the block 1 or 2, it requires to change block 3.

No, once a block is accepted you cannot change it by changing the ones that go after it.

█ ▌ We have created a Pool for Proof of Stake Blockchains  ▐ █
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ POOL OF STAKE ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
 ⮜⮜ LINKEDIN ⮞⮞ BITCOINTALK ⮞⮞ MEDIUM ⮞⮞ TWITTER ⮞⮞ FACEBOOK ⮞⮞ TELEGRAM ⮞⮞
HeRetiK
Legendary
*
Offline Offline

Activity: 3108
Merit: 2177


Playgram - The Telegram Casino


View Profile
March 04, 2018, 05:21:51 PM
Merited by CryptoEnthused (1)
 #3

Well, as it's known, every block has a hash pointer pointing to the hash of a previous block. Suppose we have block 1, block 2 and block 3. Block 3 has a hash pointer to the hash of the block 2, the block 2 has a hash pointer to the hash of the block 1. That means that in order to change any data in the block 1 or 2, it requires to change block 3. It seems very hard and the difficulty increases drastically with every new block added to the blockchain. But how hard is it to change just one last block while there is no hash pointer pointing to it? Suppose the block 3 has been mined mined just now and the block 4 hasn't been mined yet. Is there a chance to tamper with the block 3?

What you are describing sounds like an Alternative History Attack as described here:

https://en.bitcoin.it/wiki/Irreversible_Transactions

Basically, in your scenario, an adversary would need to have enough hashrate to outrun the rest of the network between block 3 and block 4. In other words, they have roughly 10 minutes to mine 3 valid blocks -- the block with the double-spend and 2 blocks on top. Once they own the longest chain, the rest of the network follows and "their" blockchain is the canonical one.

The chance of such an attack succeeding depends on the hashrate of a would-be adversary. If an adversary controls more than half the network, the chance of success is 100% -- the infamous 51% attack. However the chance for success diminishes pretty quickly the smaller a percentage of the network the would-be adversary controls.

You can calculate some scenarios here, if you like:

https://people.xiph.org/~greg/attack_success.html

An attempt to outrun the 3 confirmations of your scenario with eg. 30% of Bitcoin's hashrate, would succeed with 32.5% probability. With only 10% of the network you're already down at 1.3% success probability.


Keep in mind that these attacks are very costly, as every failed attempt results in forfeited block rewards and transaction fees for each block you tried to outrun.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
CryptoEnthused (OP)
Member
**
Offline Offline

Activity: 190
Merit: 15


View Profile
March 04, 2018, 07:14:58 PM
 #4

Well, as it's known, every block has a hash pointer pointing to the hash of a previous block. Suppose we have block 1, block 2 and block 3. Block 3 has a hash pointer to the hash of the block 2, the block 2 has a hash pointer to the hash of the block 1. That means that in order to change any data in the block 1 or 2, it requires to change block 3. It seems very hard and the difficulty increases drastically with every new block added to the blockchain. But how hard is it to change just one last block while there is no hash pointer pointing to it? Suppose the block 3 has been mined mined just now and the block 4 hasn't been mined yet. Is there a chance to tamper with the block 3?

What you are describing sounds like an Alternative History Attack as described here:

https://en.bitcoin.it/wiki/Irreversible_Transactions

Basically, in your scenario, an adversary would need to have enough hashrate to outrun the rest of the network between block 3 and block 4. In other words, they have roughly 10 minutes to mine 3 valid blocks -- the block with the double-spend and 2 blocks on top. Once they own the longest chain, the rest of the network follows and "their" blockchain is the canonical one.

The chance of such an attack succeeding depends on the hashrate of a would-be adversary. If an adversary controls more than half the network, the chance of success is 100% -- the infamous 51% attack. However the chance for success diminishes pretty quickly the smaller a percentage of the network the would-be adversary controls.

You can calculate some scenarios here, if you like:

https://people.xiph.org/~greg/attack_success.html

An attempt to outrun the 3 confirmations of your scenario with eg. 30% of Bitcoin's hashrate, would succeed with 32.5% probability. With only 10% of the network you're already down at 1.3% success probability.


Keep in mind that these attacks are very costly, as every failed attempt results in forfeited block rewards and transaction fees for each block you tried to outrun.


That made it clearer. But why 3 valid blocks? Isn't 1 enough? If an adversary changes data in the block 3 and mines the block 4 faster than the rest of the network, wouldn't that be enough? It would be the longest chain anyway.
HeRetiK
Legendary
*
Offline Offline

Activity: 3108
Merit: 2177


Playgram - The Telegram Casino


View Profile
March 04, 2018, 07:46:22 PM
 #5

That made it clearer. But why 3 valid blocks? Isn't 1 enough? If an adversary changes data in the block 3 and mines the block 4 faster than the rest of the network, wouldn't that be enough? It would be the longest chain anyway.

Ah, I guess I misread your initial post. I thought you meant "rewriting" a block 3 blocks deep into the blockchain. If you only want to rewrite the last block you of course only need to beat the network by that one block and the subsequent one.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
CryptoEnthused (OP)
Member
**
Offline Offline

Activity: 190
Merit: 15


View Profile
March 04, 2018, 09:52:29 PM
 #6

That made it clearer. But why 3 valid blocks? Isn't 1 enough? If an adversary changes data in the block 3 and mines the block 4 faster than the rest of the network, wouldn't that be enough? It would be the longest chain anyway.

Ah, I guess I misread your initial post. I thought you meant "rewriting" a block 3 blocks deep into the blockchain. If you only want to rewrite the last block you of course only need to beat the network by that one block and the subsequent one.

Okay, thanks for reply. Understand now
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!