# Could you hack Bitcoin / Proof of Work with one leading zero for each block?

I believe that in Bitcoin, if you would like to replace the chain, you need to pass 3 conditions. You need to have a longer chain (more blocks), you need to have a greater total difficulty (the accumulated amount of leading zeros) and you need to have 51% of the network. Now imagine having a chain of 5 blocks with each 16 leading zeros, in total this would be 80 leading zeros. The time to create a block with 16 leading zeros, is way greater than to create a block with one leading zero, 16 times. Could you replace the chain of bitcoin or set everyones balance to zero, in this example if you would create 81 blocks with each one leading zero, that way you have a greater total difficulty of 81 vs 80 leading zeros, you have a longer chain of 81 vs 5 blocks and if you could rent for example 17359 nodes for 51% of the network and try to replace the chain with a fake chain, could you hack bitcoin this way? I am trying to understand why you can not hack it this way with the help of https://wiki.bitcoinsv.io/index.php/Difficulty#:~:text=difficulty_1_target%20is%20the%20target%20used,%22%20or%20%22pdiff%22). But still i believe we can, i have heard there are more validations than these 3 could one of you tell us about the others or tell us why we can not hack bitcoin? Sorry if i make you angry i just want to know if my solution is build for nothing...

There is no "replacing the chain" in bitcoin. You're free to make whatever rules for your bitcoin fork you want, but bitcoin nodes are only going to relay transactions or blocks that are valid under the established rules.

As for the "exploit" you described, if we're at height X, there is a certain difficulty target for block X+1. If you release a batch 5 of blocks, you'll still need to follow this rule for each of your 5 blocks.

Also you can't "rent nodes". Nodes are established as a volunteer system by individuals who like bitcoin, and even if you were able to spin up 1,000,000 nodes yourself, your fork is not Bitcoin so transactions you sent on it would not be relayed by Bitcoin nodes.

• thanks for your kind reply, it is indeed x+1 or x-1 but what if you would go all the way down to the frist block after the genesis one? Apr 3, 2023 at 14:42
• Yeah you can go 1,2, 700000 blocks back. Your ultimate objective is to have a bitcoin node approve your block in favor of another block, which they're not going to do unless you prove you're more likely, according to physics/mathematics, to have done more hashes on your fork, on average, than the canonical fork. This is by design. Not sure how you're talking about manipulating hashes/difficulty but at the end of the day it is a measure of total energy consumed, so whether you have a higher/lower block height on your fork isn't going to help you. Apr 3, 2023 at 14:49
1. Bitcoin does not ever count number of leading zeroes.

2. Your conditions "longer chain (more blocks)" and "greater total difficulty" are actually just one condition in Bitcoin. Miners build on whichever chain has the most total accumulated "work", where the work is a measure of the statistically expected number of hashing attempts needed. I believe this is one condition, not two.

3. Each block is checked by every node to see that the hash is less than the target. This prevents an attacker using a series of easy blocks to replace a hard block.

4. 51% of the nodes is not an important achievement in an attempt to take over the network. The so-called "51% attack" requires >50% (not 51%) of mining hashpower (not number of nodes). Renting 17359 nodes achieves nothing.

5. There's no such thing as a fake chain really. To be relayed by nodes, a block must contain only valid data. Every input (spend) must come from an unspent output (receipt) and must contain the ECDSA proof that the spender knows the private key. All the other rules must be followed. This cannot be faked. Every node checks every bit of the data follows all the rules.

6. When you cancel a credit card payment, it doesn't mean the money returned to you is fake, nor that the money used originally to make the original payment was fake. Thinking of this as fake data obscures what is really happening.

The criteria you list for the best chain are inaccurate. The best chain is the chain that is valid and has the most work.

• The "longest chain" is an imprecise earlier attempt at articulating the "chain with the most work".
• "Having 51% of the network" is either an imprecise formulation of a related idea or unnecessary. On one hand, the most-work criterion already implies that the best chain is authored by the majority of the hashrate. On the other hand, each node unilaterally whatever protocol rules it implements. Transactions and blocks have to pass those rules to be added to its blockchain, it cannot and will not be influenced by peers being more permissive.

Every node operator chooses the rules of Bitcoin individually by deciding what software they run. The most common node implementation on the network is currently Bitcoin Core. Bitcoin Core requires that each block must meet the current difficulty target. The difficulty target is set every 2016 blocks based on the amount of time that passed in the previous difficulty period and the previous difficulty target. Blocks that don’t meet the current difficulty (“have fewer leading zeros”) are not valid blocks and will be rejected by any software that implements Bitcoin’s protocol rules.

If someone were to spin up millions of nodes that implement more permissive difficulty rules, those nodes might follow a different chain, perhaps even one that is produced by more hashrate, but existing Bitcoin nodes would still reject it as invalid. For more permissive rules to come into affect and the resulting network to be called "Bitcoin", the majority of the hashrate, the majority of the users, and the vast majority of the economic activity would need to switch to those rules.

Therefore, the described attack of producing many blocks at lower difficulty in itself is not a concerning vector of attack. Even if the attacker operates many nodes that follow a different set of rules, the existing nodes would continue to follow only blocks they deem valid per the existing rules. Existing nodes would reject the blocks that don’t fit the rules of the Bitcoin protocol and drop connections to the attacker’s nodes for sending invalid data.