Bitcoin Forum
November 03, 2024, 07:29:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can a miner meddle with the transaction data in a block?  (Read 440 times)
bitcoin_geek (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 22, 2017, 06:30:27 AM
 #1

Hi,

If it is possible to introduce an nonce in the data to produce a new has, can a miner play around with the transaction data also?

If Yes, then let's say he changes the data of a particular transaction, then verifies it and that block gets stored in the blockchain. In this way that particular transaction(altered one) is authenticated and thus disturbs the blockchain.
What are the protocols to avoid such situations?

PS - I am a beginner and just trying to understand how BitCoin and Blockchain works. Thanks in advance! Smiley
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6885


Just writing some code


View Profile WWW
March 22, 2017, 03:07:20 PM
 #2

Generally a miner cannot change the data within a transaction without completely invalidating it. Most transactions include digital signatures, and these signatures sign the entirety of the transaction, except for the signature itself. This means that if anything in the transaction is changed, the signature will not be valid and the transaction is thus invalid. If the miner changes the signature itself, the signature will no longer match the data it is supposed to sign so the transaction will also be invalid. These signatures is what prevents anyone else on the network from modifying your transactions and giving themselves the Bitcoin.

There are a few cases where this is possible, but those are for very advanced users and rarely implemented in wallets except for the most expert of users.

What miners do besides changing the nonce is changing the extranonce in the coinbase transaction of the block. The miner makes the coinbase transaction and has full control over it. They can also select different transactions or reorder transactions thus changing the merkle root of the block in order to find a hash that is valid.

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!