Bitcoin Forum
May 06, 2024, 11:02:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Largest number of blockchain-heads (single fork) ever observed?  (Read 896 times)
fevir (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 5


View Profile
September 27, 2016, 08:25:22 PM
Merited by ABCbits (2)
 #1

Hi All,

A fork occurs when two or more miners separately create a block at approximately the same time. The Bitcoin blockchain then (temporarily) consists of two or more blockchain heads.

This site (http://bitcoin.stackexchange.com/questions/3343/what-is-the-longest-blockchain-fork-that-has-been-orphaned-to-date) shows the length of the longest fork created on the Bitcoin blockchain.

However, if two miners separately create a block, a two-headed blockchain appears. If n-miners separately create a block, an n-headed blockchain appears. What is the largest value of n ever observed on the Bitcoin blockchain?

And is there a source where one can observe the average fork-height (n) of the Bitcoin blockchain?

Thanks,
Fevir
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
September 27, 2016, 08:43:52 PM
Merited by ABCbits (2)
 #2

Bitcoin Core keeps track of all blocks that it receives, including these stale blocks and chain reorgs. If you use the RPC command getchaintips, you will be able to see all of the possible blockchain tips that your node knows of. Thus you can check to see how many stale blocks of the same height there are.

fevir (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 5


View Profile
September 28, 2016, 06:26:17 PM
 #3

Hi,

Thanks for your reply. Indeed, the 'bitcoin-cli getchaintips' command seems to be working.

Just to make sure to get it right, if I perform a (on Linux):
bitcoin-cli getchaintips | grep height | <some sed here, leaving only the numerical height> > <file>
and,
sort <file> | uniq -c | head

should provide an overview of the top 10 largest stale blocks of the same height?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
September 28, 2016, 06:34:02 PM
 #4

Hi,

Thanks for your reply. Indeed, the 'bitcoin-cli getchaintips' command seems to be working.

Just to make sure to get it right, if I perform a (on Linux):
bitcoin-cli getchaintips | grep height | <some sed here, leaving only the numerical height> > <file>
and,
sort <file> | uniq -c | head

should provide an overview of the top 10 largest stale blocks of the same height?
I think you need another sort after uniq in order to have it in order of most stale blocks for a height.

fevir (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 5


View Profile
October 06, 2016, 01:59:21 PM
 #5

After some testing, yes, it needed another sort, thanks.

However, I seem to be getting only a single chain tip (the latest block), probably because I'm connected to a single node only. This is my output:
$ bitcoin-cli getchaintips
[
  {
    "height": 432407,
    "hash": "0000000000000000015ef5f0c0aba9e0697b38010b50eb0beaf7f795416440a6",
    "branchlen": 0,
    "status": "active"
  }


As an open question, what is the maximum number of Bitcoin blockchain tips (single fork) you ever observed?

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!