Author

Topic: Can a miner meddle with the transaction data in a block? (Read 440 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
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.
newbie
Activity: 4
Merit: 0
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
Jump to: