Bitcoin Forum
April 24, 2024, 10:08:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: handling block branches  (Read 2039 times)
zef (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
May 26, 2011, 02:20:10 AM
 #1

I was having a discussion with a friend about bitcoins and he brought up a question I wasnt sure how to answer.  I've looked at the wiki, but i think i need someone to explain it in plain english to me: https://en.bitcoin.it/wiki/Protocol_rules

I want to know what happens in this scenario:
Lets assume mexico and usa use bitcoins on the same big network, but theres a single connection connecting mexico to usa.  This connection gets severed for some amount of time, say a day.  During this time both countries go on doing transactions and archiving blocks.  Lets say that usa finds blocks now at 4 per hour, while mexico only finds them at 2 per hour. So usa will have a block chain that is 48 blocks longer than mexico by the time the connection comes back. 

The question is, what happens to all the transactions in both countries when the connection is restored? My answer was that once connection was restored, mexico would download usa block chain, and because its more difficult, it would essentially wipe out all the transactions mexico made during the disconnect. This was based on my understanding of how clients accept new blockchains, but obviously this would be a huge problem for bitcoins if it was the case.  Could someone explain it to me? 
1713996480
Hero Member
*
Offline Offline

Posts: 1713996480

View Profile Personal Message (Offline)

Ignore
1713996480
Reply with quote  #2

1713996480
Report to moderator
1713996480
Hero Member
*
Offline Offline

Posts: 1713996480

View Profile Personal Message (Offline)

Ignore
1713996480
Reply with quote  #2

1713996480
Report to moderator
1713996480
Hero Member
*
Offline Offline

Posts: 1713996480

View Profile Personal Message (Offline)

Ignore
1713996480
Reply with quote  #2

1713996480
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713996480
Hero Member
*
Offline Offline

Posts: 1713996480

View Profile Personal Message (Offline)

Ignore
1713996480
Reply with quote  #2

1713996480
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12884


View Profile
May 26, 2011, 02:57:10 AM
 #2

All of the miners in Mexico will put the transactions in their old chain back into the transaction queue once they switch chains.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
zef (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
May 26, 2011, 12:06:53 PM
 #3

All of the miners in Mexico will put the transactions in their old chain back into the transaction queue once they switch chains.

So you are saying the blocks mexico mined will be undone, but the transactions will still exist and need to be added and verified by usa blockchain?
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12884


View Profile
May 26, 2011, 01:15:16 PM
 #4

So you are saying the blocks mexico mined will be undone, but the transactions will still exist and need to be added and verified by usa blockchain?

Yes.

Transactions will only become invalid if:
- The split lasts so long that Mexico generates 100 blocks and generations therefore mature; or,
- Someone who can communicate on both sides of the split double-spends his coins.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
zef (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
May 26, 2011, 02:11:17 PM
 #5

Interesting... So what happens to the money earned from solving the blocks on mexico's side, those transactions can't be allowed to exist if the blocks are undone, right?

This 100 block maturity level, what is that based on?  Also do you think the way bitcoin handles disconnected networks could be a problem for global acceptance of bitcoins?  If a whole country was to accept it as a national currency, would make sense to have its own version of bitcoin separate from other nations?
compro01
Hero Member
*****
Offline Offline

Activity: 590
Merit: 500



View Profile
May 26, 2011, 04:47:55 PM
 #6

Interesting... So what happens to the money earned from solving the blocks on mexico's side, those transactions can't be allowed to exist if the blocks are undone, right?

This 100 block maturity level, what is that based on?  Also do you think the way bitcoin handles disconnected networks could be a problem for global acceptance of bitcoins?  If a whole country was to accept it as a national currency, would make sense to have its own version of bitcoin separate from other nations?

1. they go poof and vanish as if they never existed, which they really didn't.

2. AFAIK, the number of blocks to maturity is arbitrary.

3. i wouldn't think so.

4. i personally don't think it would make sense.  you'd effectively end up with multiple independent and parallel block chains and thus multiple independent currencies, much like today, and you'd need to exchange between them to get anything done internationally, much like with current currencies, though i'm sure someone somewhere would think that makes sense.
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1128


View Profile
May 26, 2011, 04:49:19 PM
 #7

Total disconnection for days on end is very rare. I think Egypt is the only recent example.
Dobrodav
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
May 26, 2011, 07:03:33 PM
 #8

Total disconnection for days on end is very rare. I think Egypt is the only recent example.
Should read like :
"Total disconnection for days on end is very rare. But we already saw that in Egipt.
Fact, that Egypt gov. was turn of any internete providing was good in terms of bitcoin. No transactions, no generation."

zef (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
May 26, 2011, 07:35:22 PM
 #9


1. they go poof and vanish as if they never existed, which they really didn't.


This means any transactions based on coins generated from blocks would disappear, this could be a big problem if actual goods were traded with that money.

Total disconnection for days on end is very rare. I think Egypt is the only recent example.

It would only take 17 hours at 6 blocks an hour to hit the 100 block level.  I mean its not very probable that something like that could happen, but it's possible.

As a lay person this would be very disconcerting, particularly if bitcoins had aspirations to be truly global.  Even if a small town or city was disconnected from the rest of the world for an extended period of time, transactions would not be safe until connection was restored.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
May 26, 2011, 09:25:07 PM
 #10

if there was a network split, then bitcoin users would likely find out about it, and hold off on transactions/mining until it's repaired.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
May 26, 2011, 09:31:57 PM
 #11

It would only take 17 hours at 6 blocks an hour to hit the 100 block level.  I mean its not very probable that something like that could happen, but it's possible.

If the network was split 50/50, then each half would generate blocks half as fast.  So it would take 34 hours.

For an "Egypt splits off from the rest of the network" scenario, it would probably split something like "less than 5% generated in Egypt, 95% rest of the world" in which case it would take 17/.05 = over two weeks for the blocks generated in Egypt to mature.

How often do you get the chance to work on a potentially world-changing project?
Frozenlock
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
May 26, 2011, 11:22:15 PM
 #12

Wait, what happens when the 100 blocks is reached? The network is split for good?
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
May 26, 2011, 11:28:02 PM
 #13

It would only take 17 hours at 6 blocks an hour to hit the 100 block level.  I mean its not very probable that something like that could happen, but it's possible.

If the network was split 50/50, then each half would generate blocks half as fast.  So it would take 34 hours.

For an "Egypt splits off from the rest of the network" scenario, it would probably split something like "less than 5% generated in Egypt, 95% rest of the world" in which case it would take 17/.05 = over two weeks for the blocks generated in Egypt to mature.

No place with enough computing power to run 100 blocks in a reasonable time at then-current difficulty will ever be disconnected.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Quantumplation
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
May 27, 2011, 12:10:27 AM
 #14

All of the miners in Mexico will put the transactions in their old chain back into the transaction queue once they switch chains.

Almost, but one minor caveat: The group with more people/miners would be accepted as the proper block chain.  If mexico had more users in their network than the US (given the relative sizes of the countries, I doubt it) then it would be the US transactions that would need to be re-validated.

NOTE: This account was compromised from 2017 to 2021.  I'm in the process of deleting posts not made by me.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12884


View Profile
May 27, 2011, 02:14:52 AM
 #15

Wait, what happens when the 100 blocks is reached? The network is split for good?

Coins created through generation are not spendable until they have 100 confirmations. So once a split lasts longer than 100 blocks (from the perspective of the smaller side), lots of people are likely to lose transactions, as all transactions based on the now-invalid generated coins will also become invalid.

Almost, but one minor caveat: The group with more people/miners would be accepted as the proper block chain.  If mexico had more users in their network than the US (given the relative sizes of the countries, I doubt it) then it would be the US transactions that would need to be re-validated.

The OP specified that Mexico is the smaller side.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
zef (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
May 27, 2011, 02:54:28 AM
 #16

ok wow i get it, thanks for the replies.  So coin generated from block finding are not spendable until there are 100 confirmations, and a confirmation is equivalent to solving one block? 

If that is the case that is so interesting, I had no idea.  I'm glad this seems a bit more robust than i first thought. So yes you can be screwed if you are disconnected long enough, but for the most part there is a reasonable amount of time to get back into the network, related to your relative size to the network. 

Worst case(time-wise) is like a 49/51 split near the end of a difficulty phase, where if like last phase, block gen rate was over 13 per hour.  Of course this scenario is very unlikely though, it only really seems plausible if small poorly connected sections of the network disconnect, but then they would have days, if not weeks to re-join the network.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!