Handling Bitcoin Firewall?
10 years later the firewall is opened. Does every in-country transaction chain have to be added to every account chain in the world? Do all of the world's transactions have to be added to the in-country transactions?
10 years later the firewall is opened. Does every in-country transaction chain have to be added to every account chain in the world? Do all of the world's transactions have to be added to the in-country transactions?
AFAIK, when a node finds a new block, it announces that to its peers and starts working on finding the next block. No explicit acknowledgment from peers is required, instead they implicitly acknowledge the new block by appending it to their version of the chain and working on finding the next block based off that version. If a node receives a broadcast with a chain that is different than the one it currently works off of, it keeps the one that is more difficult to verify ("longer"), discarding the other one.
If you would divide all nodes into two unconnected sets (by the hypothetical firewall), two parallel versions of the chain would emerge, and those chains would diverge at the block that was last found before the separation event. Once you drop the firewall, the longer version would "win" over the shorter version, and all blocks mined on the losing chain since the separation become "stale", and the transactions contained in those blocks are returned to the mempool for re-processing. This is a huge problem, since the processing order is not guaranteed and depends on the fees transactions are endorsed with. Addresses could theoretically spend BTC they do not yet possess. Not sure how this would be handled.
If this is a prolonged event, the Bitcoin community would probably work on a software fork in some way?
Transactions that were "known good" for the last 5 years might not be valid, or at least could take years to validate.
Look at it this way: Would you trade Bitcoin with someone on a private intranet? They tell you "give me $1000 and I'll transfer you the coins on my intranet, not on the public net". Of course you wouldn't, right?
Russia has suggested dropping off the internet: https://www.technologyreview.com/2019/03/21/65940/russia-wan...
China has a fairly successful firewall and has recently come out against bitcoin mining.
I can see a country that feels that bitcoin threatens its currency working hard to create a bitcoin firewall. I can also see the firewall being lifted after a change in government.
If the country re-joins and its blockchain is shorter than the current chain, what happens to all the transactions? What happens to the coins that are mined within the country?
I can see where a country could have billions of micro-transactions (e.g. coffee purchases) that happen over a single year.
Is it even worth the processor time to process billions of "penny" transactions?
This said if you had n btc before firewall, you’ll still have n btc when it reopens.
(note that, as other said, such a firewall may be hard to do.)
I was trying to say that Bitcoin doesn't handle "merge". If 2 chains diverge at some point for whatever reason (in this case a firewall) then the nodes have the incentive to only keep the longest and discard the other one.
Therefore when the firewall disappears, all nodes will continue on the primary chain, with the effect of "discarding" all transactions that happened inside the firewall. And the amount of BTC in the op's wallet would be "reset" at the value it had before the firewall.
What you propose cannot work.
As a result, both sets of nodes create long chains based on the transactions they see.