4 ms·
> you can attack the network by including illegitimate transactions in the blocks This part is incorrect. Any block with an invalid transaction will be rejecte
by deweller 9y ago
> you can attack the network by including illegitimate transactions in the blocks
This part is incorrect. Any block with an invalid transaction will be rejected by the rest of the network.
- cookiecaper 9y agoRight ... as long as you don't control "the rest of the network", which is what a 51% attack is. Faced with two competing chains, my understanding is that the bitcoin network chooses the longer one, assuming that the other tangents are dead (either due to a policy change or an invalid block). In practice it would probably help to control more than 51% of the network, but it's called a 51% attack because theoretically, that's all you need to create the longest (that is, the winning) chain.
- deleted 9y ago[deleted]
- deweller 9y agoA 51% attack only beats out the other miners. The network includes all of the individuals and businesses who run nodes but don't mine. They will only accept valid blocks. So say you execute a 51% attack and attempt to include an invalid transaction. No other node on the network will accept that block as valid. So all of the businesses, including the bitcoin exchanges, will reject your block as invalid and not process it. And any block you try to build on that invalid block will also be invalid for the same reason. You cannot include any invalid transactions in a bitcoin block even if you had 99% of the hashing power. The rest of the network will just ignore all of your blocks and will accept the next valid block that comes along.
- cookiecaper 9y agoOK, thanks for clarifying. Is this enforced client-side in the default client? What other types of validations are performed client-side? Where is the limit on the trace up the chain? You'd have to have a full clone of the blockchain to validate all the way up, or it'd terminate at the oldest block. I assume that even if you're one of the few still running a full chain these days, transactions in the block aren't checked against the coin's entire history. Does it reject/ignore the entire block or just the transactions for which it has a conflicting history?
- TD-Linux 9y agoYes, the original client (Bitcoin Core) and some others enforce it, while others (Electrum) only rely on the proof-of-work, which of course is more risky, but acceptable for some users. You need to follow the chain back from the very first block (the genesis block), not only to verify the following blocks but any blocks in the future (you could spend an unspent output from the very first block and it would be valid). Luckily, you don't actually need to store the blocks, just the parts that affect future validation (the UTXO set), so you can throw the blocks away after this (called prune mode in Bitcoin Core). As long as you can put up with the initial sync (several hours) the costs aren't too bad. In fact, I would argue the very limited powers given to miners is one of the most important parts of Bitcoin. When even a single transaction in a block is invalid, the entire block is rejected wholesale.
- Cyphase 9y agoFirst, to clarify, clients don't choose the longest chain; they choose the chain that took the most work to create. Someone could trivially create a new, longer chain with the genesis block at it's root and completely rewrite the transaction history, but since they can't trivially create blocks that prove more work (as in proof-of-work), no other clients would use that chain. That said, clients will choose the valid chain that took the most work to create. If someone with 51% starts creating invalid blocks, nobody else will accept them, and the practical effect will just be a 51% reduction in mining power on the network. EDIT: Oops, brain fault. I had this tab open for a few days, then happened to come back, read the parent comment, and responded; only then did I realize it was posted 6 days ago, not 6 minutes ago..