Bitcoin Forum
November 10, 2024, 04:59:23 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Easy Way To Detect Bitcoin Fork?  (Read 3831 times)
jimbobway (OP)
Legendary
*
Offline Offline

Activity: 1304
Merit: 1015



View Profile
April 19, 2011, 03:15:50 PM
 #1

I hear about this all the time...the chain forking...what's the easiest way to detect a fork?  Can someone develop this and put it on a website?
Cdecker
Hero Member
*****
Offline Offline

Activity: 489
Merit: 505



View Profile WWW
April 19, 2011, 04:35:52 PM
 #2

A fork is not easy to detect. It is the consequence of a network partition which can be caused by ad luck or a connectivity problem (chinas firewall blocks bitcoin traffic => fork). If a fork happens the networks might rejoin again later, discarding the shorter chain (probably the smaller partition).
Structuring the network might be a first step towards a partition tolerant network but currently there's no easy way.

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5376
Merit: 13407


View Profile
April 19, 2011, 05:57:11 PM
 #3

With network segmentation, blocks will be produced more slowly. There will also be a large reorg after the network recombines, which is detectable.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
MoonShadow
Legendary
*
Offline Offline

Activity: 1708
Merit: 1010



View Profile
April 19, 2011, 06:34:41 PM
 #4

I hear about this all the time...the chain forking...what's the easiest way to detect a fork?  Can someone develop this and put it on a website?

What kind of fork?  If you mean a network split, a seperate 'watchdog' process can detect when the intervel between blocks suddenly doubles, and issue a warning.  Each successive block that is over 80% longer than the prior average increases the certainty that a network split has occurred, and that you are likely on the wrong side of it.  If you are on the majority side, it doesn't really matter.

If you mean a blockchain split, then such a event can be detected by the clients because some of the clients will receive two valid blocks, and has to keep both until the next block is created, which then breaks the tie by being built off of one or the other.  The loser is discarded.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
April 19, 2011, 07:09:57 PM
 #5

You can run bitcoin -printblocktree then look in debug.log to see any chain splits your client observed. My copy has seen three throughout its lifetime, all of them only a single block long.
Raulo
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
April 19, 2011, 07:51:18 PM
 #6

You can run bitcoin -printblocktree then look in debug.log to see any chain splits your client observed. My copy has seen three throughout its lifetime, all of them only a single block long.

It seems low. All invalid blocks are a single block splits. Whenever such a block is deemed invalid by the bitcoin program (because an alternative forked tree grew longer) and transactions are merged into the current tree, bitcoin prints "REORGANIZE" into debug.log. I grepped 4 such instances in April only. There should have been been more because my deamon may have picked the "correct" tree and didn't need to reorganize anything.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
April 19, 2011, 09:34:20 PM
 #7

Detecting the split while it is happening and after the forks are being merged are two different things

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
Raulo
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
April 19, 2011, 09:53:39 PM
 #8

Detecting the split while it is happening and after the forks are being merged are two different things

Not very much unless the fork is hidden and grown independently of the network. If you have a well connected bitcoin daemon, it usually receives information about both the forking blocks from the network. It's now just a matter of checking ancestry of the blocks.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
April 19, 2011, 11:12:39 PM
 #9

Perhaps with should be talking about short term and long term forks

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
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!