1

I understand that forks are resolved by opting in for the eventual longest chain, preferring the chain with the longest POW. But everything I read on this suggests it's just random chance or that the next block is really "alone" on some nodes due to delays in propagating, so "tough luck".

But let's imagine the scenario where a miner changes the last block with incorrect information for his own benefit, creating block A which should be rejected by the network. Another miner creates block B with the correct data. We now have a fork, with block A and B being at the end of the chain. The next miner needs to choose one of the blocks, hopefully not validating the bad intentions of the first miner. How does this gets resolved, how does block A get proven wrong?

8
  • Validating a block is extremely fast compared to mining it, it can be done in a matter of seconds. The malicious block wouldn't validate, no other node would accept it.
    – Polygnome
    Mar 23 at 17:06
  • Why wouldn't be accepted? The hashes are correct, what other validations are performed?
    – C0pterPi
    Mar 23 at 17:45
  • If the hashes are correct, then the block isn't malicious, Its a valid block. It can't have "incorrect information" if its a valid block.
    – Polygnome
    Mar 23 at 18:03
  • 2
    @C0pterPi the hash is only one of many checks to ensure a block is valid. If anything is invalid (such as a transaction with an invalid signature), then the block is rejected.
    – chytrik
    Mar 23 at 21:55
  • 1
    @C0pterPi The block is either valid or invalid. If it's valid, then there's no problem. If it's invalid, then everyone ignores it. Mar 25 at 2:50
1

It's valid but it's a miner writing wrong data, e.g. changing a transaction address to his own or changing a 3 btc transaction to 30 (while the wallet holds 50). The hashes are correct but the miner is using his position as miner to benefit himself or others

Miners can't change that data in a transaction because that data is secured by the transaction-author's digital signature. Any change in the data will cause a signature check to fail.

Nobody cares about other people's balances, no one ever needs to know another person's balance. Bitcoin keeps track of coins not balances. In this case a coin means an unspent transaction output (UTXO). These UTXOs can only be spent by someone who knows the secret number (private-key) that can be used in a mathematical proof of right to spend.

5
  • Yes, that makes sense, thanks. I guess I'm looking for realistic scenarios where a miner could try and cheat the blockchain, but the tech is resilient enough to not even allowing my scenario coming to fruition.
    – C0pterPi
    Mar 24 at 12:32
  • @C0pterPi Miners can re-write the blockchain at will if the have more than 50% of the hashing power, this is known as the "51% attack".
    – Polygnome
    Mar 24 at 14:18
  • But how would they even start at re-writing anything if they can't sign other people transactions, therefore having nothing they can change?
    – C0pterPi
    Mar 24 at 15:02
  • Very cool, a lot less than I imagined.
    – C0pterPi
    Mar 26 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.