Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: nibor on September 12, 2011, 10:46:09 AM



Title: Bitcoin p2p Network Status Charts.
Post by: nibor on September 12, 2011, 10:46:09 AM

We have just launched a new website that monitors the health and status of the Bitcoin P2P network.

There are an assortment of charts that show for example the number of hosts, messages per hour etc.. over time. We are collecting statistics on 10 metrics at the moment and have plans to add to them. We have only been collecting data for a few days, but over time it will become a valuable tool.

Website is at:
http://bitcoinstatus.rowit.co.uk (http://bitcoinstatus.rowit.co.uk)


Any comments welcome.


Thanks

RowIT Ltd.



Examples of charts are:
http://bitcoinstatus.rowit.co.uk/hostsWeek.png

http://bitcoinstatus.rowit.co.uk/messageBytesWeek.png



Title: Re: Bitcoin p2p Network Status Charts.
Post by: GideonGono on September 12, 2011, 12:39:50 PM
great job!


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Cryptoman on September 13, 2011, 06:12:11 AM
Wow, 60k nodes.  Thanks for putting up the site.  Nice job.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: GideonGono on September 13, 2011, 11:38:57 AM
Does a mining rig count as a node? Also if there are multiple bitcoiners in a household where they share an IP does that show up as one or multiple nodes?


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on September 13, 2011, 11:43:25 AM

Whether mining rigs show up is determined by whether they are running a bitcoin client that is connected to the main p2p network. If they are then it will if not it will not.

If you have multiple clients behind one NAT router they will show up as one in my stats.

Thanks for the interest. Will be interesting in a few months time to see how the charts trend and whether the number of hosts and the exchange rate have any correlation!


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Bert on September 13, 2011, 11:50:56 AM
Very nice. Now all that is needed is an IP map like http://nsa.unaligned.org/ or http://xkcd.com/195/

EDIT: Actually you kind of have that covered by the country graphs. Great stuff, will be very interesting to watch over the coming months and years. Sent a donation.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: molecular on September 13, 2011, 11:58:06 AM
cool stuff!


Title: Re: Bitcoin p2p Network Status Charts.
Post by: LightRider on September 13, 2011, 09:56:18 PM
Thanks for the much needed metrics! It will be interesting and fun to watch them grow over time.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Stephen Gornick on September 13, 2011, 10:10:17 PM
Quite a difference between these numbers and the stats here: http://smsz.net/btcStats/accepting

http://stats.bitcoin.it/rrd/nodes_total-year.png (http://stats.bitcoin.it/rrd/nodes_total-year.png)

https://en.bitcoin.it/wiki/Bitcoin_Map


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Clark on September 13, 2011, 10:30:54 PM
These graphs are great! Keep up the good work.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: fornit on September 13, 2011, 11:34:09 PM
nice!

can you aggregate the data for the countries?
the graph is barely readable and the big "other" is a little ackward.
how about continents? or at least join countries into somewhat bigger entities.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on September 13, 2011, 11:56:35 PM
Quite a difference between these numbers and the stats here: http://smsz.net/btcStats/accepting

http://stats.bitcoin.it/rrd/nodes_total-year.png (http://stats.bitcoin.it/rrd/nodes_total-year.png)

https://en.bitcoin.it/wiki/Bitcoin_Map



Yes a big difference. What I did notice was reading the wiki entry it says:
Quote
It represent the total number of unique IPs seen within the last 3 hours on the network.

This would explain it as hosts only transmit their address every 24 hours. However in reality it is a lot more often than that as they are relayed, hosts stop and start etc... So monitoring over a 3 hour window instead of the 24 hour that we do could easily explain the difference.

But as it is a decentralised network nobody can be totally sure who is right!


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Alex Thornton on September 14, 2011, 05:09:31 AM
Wow, great charts.

I have a few questions:

How close do you think the total 60k hosts is to the actual number of hosts. Is it even possible to be certain that you counted the vast majority (ie. 99%) of active hosts?

In the chart depicting the number of hosts in each country, you list "other" as a category. Does this category of around 10,500 hosts consist of other countries and unknown locations or just other countries?


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on September 14, 2011, 07:59:08 AM
I think that the chances are these charts are overestimates of number of hosts rather than underestimates.

We did a simulation of the whole network to prove that the methodology was correct:

https://github.com/n1bor/bitcoin-simulation (https://github.com/n1bor/bitcoin-simulation)

But if someone downloads the client, runs it for 5 mins then loses interest and shuts it down we will count them as a host for the following 24 hours.

For the estimate of the number of hosts that are listening though these charts underestimate. As by default hosts are limited to 125 connections, and when that is full they will not accept any more. As such in the total of listening hosts we will not include them once they reach the 125 as we can not connect. Currently if you leave a host running it seems to reach 125 connections after about 1 week - not sure what to conclude from this though.


Regarding the "other" countries these are just a long list of other countries. When I get a chance I will add a table to the site that lists them all and their last number of hosts connected.





Title: Re: Bitcoin p2p Network Status Charts.
Post by: tcatm on September 15, 2011, 10:32:23 AM
I recently created this chart https://i.imgur.com/sotmB.png (y: seconds, x: blocks)

Maybe it's something you could add to your site? It might be useful to detect irregular timestamps.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on September 15, 2011, 10:14:16 PM

Just added the full list of hosts by country to the bottom of the front page. Makes interesting reading.


Country   Number of Hosts
United States   17590
Russian Federation   4805
Ukraine   3799
Germany   3601
Poland   3163
Canada   2425
United Kingdom   2401
Australia   1364
Netherlands   1160
China   1075
Belarus   1064
Romania   973
Sweden   889
European Union   839
Czech Republic   670
France   646
Malaysia   615
Brazil   600
Thailand   551
Bulgaria   551
Spain   529
Finland   525
Serbia   457
Bosnia and Herzegowina   416
Argentina   384
Italy   382
Hungary   370
Austria   358
Switzerland   309
Ireland   296
India   291
Belgium   282
Lithuania   280
Denmark   279
Norway   279
New Zealand   275
Macedonia   269
Israel   265
Portugal   259
South Africa   238
Mexico   229
Croatia (LOCAL Name: Hrvatska)   204
Slovenia   188
Singapore   178
Georgia   168
Philippines   151
Greece   143
Colombia   138
Slovakia (SLOVAK Republic)   119
Japan   116
Chile   114
Moldova Republic of   111
Viet Nam   105
Montenegro   102
Taiwan; Republic of China (ROC)   99
Estonia   98
Kazakhstan   97
Hong Kong   93
Latvia   86
Trinidad and Tobago   67
Turkey   65
Venezuela   61
Armenia   52
Korea Republic of   49
Mongolia   41
Cyprus   38
Saudi Arabia   36
Indonesia   35
Morocco   34
Iceland   31
Luxembourg   30
Saint Vincent and The Grenadines   28
Sri Lanka   25
Uruguay   19
Egypt   18
Paraguay   17
Jamaica   16
Bangladesh   15
Ecuador   13
Puerto Rico   12
Kyrgyzstan   11
Pakistan   10
Antigua and Barbuda   9
Lebanon   8
Bahrain   7
El Salvador   6
Maldives   5
Tanzania United Republic of   4
Barbados   3
Cape Verde   2
Afghanistan   1


Title: Re: Bitcoin p2p Network Status Charts.
Post by: ThePok on September 19, 2011, 10:49:24 PM
Great site! Never take it down! :)


Title: Re: Bitcoin p2p Network Status Charts.
Post by: molecular on September 23, 2011, 11:36:47 PM
It might be really interesting to see "number of hosts per capita" for each country.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Bert on September 24, 2011, 02:21:44 PM
It might be really interesting to see "number of hosts per capita" for each country.
It is a shame that the CIA World Factbook does not just return numbers for population of each country.
https://www.cia.gov/library/publications/the-world-factbook/fields/2119.html#rs


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Simon Barber on September 24, 2011, 03:46:53 PM
I'd be very interested in some statistics on how long it takes transactions and blocks to propagate across the bitcoin network. Could you collect some data on these times? I.E. Measure when you receive a particular tx or block from different nodes, and track something like the 95% percentile of the delay.

Having good data on this (especially for blocks) is relevant to any discussion of changing the blocktime to less than the current 10 minutes.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on September 24, 2011, 08:12:01 PM
Starting to see a nice increase in version 0.4.0 usage.
Up to 405 at time of this post...
http://bitcoinstatus.rowit.co.uk/versionsWeek.png


Note this chart only shows nodes that are allowing connections (i.e. not behind a firewall that is stopping incoming connections).



Title: Re: Bitcoin p2p Network Status Charts.
Post by: Maged on September 25, 2011, 06:51:40 PM
I'd be very interested in some statistics on how long it takes transactions and blocks to propagate across the bitcoin network. Could you collect some data on these times? I.E. Measure when you receive a particular tx or block from different nodes, and track something like the 95% percentile of the delay.

Having good data on this (especially for blocks) is relevant to any discussion of changing the blocktime to less than the current 10 minutes.
It's not exactly what you're looking for, but the guy who runs this might be able to more easily add that information:
http://transactionradar.com/


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Alex Thornton on September 26, 2011, 02:15:08 AM
I noticed that some of the countries tend to disappear and reappear on the list.

For example, I saw Vietnam (~90 nodes) and Nigeria (~30 nodes) disappear and then reappear a few hours later. Since they each have more than a few nodes, I doubt that everyone in the country is turning of their clients.

Is there a particular reason for this?
 


Title: Re: Bitcoin p2p Network Status Charts.
Post by: fornit on September 26, 2011, 04:16:46 PM
total number of nodes is steadily declining.  :'(


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on October 06, 2011, 09:54:52 PM
I noticed that some of the countries tend to disappear and reappear on the list.

For example, I saw Vietnam (~90 nodes) and Nigeria (~30 nodes) disappear and then reappear a few hours later. Since they each have more than a few nodes, I doubt that everyone in the country is turning of their clients.

Is there a particular reason for this?
 

There was a bug - when I sorted the countries by number of connection I removed duplicates! This issue is now fixed.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on October 06, 2011, 09:57:33 PM

Had a corruption in the BerkDB that tracks the connections. I have changed code to be transactional so should not happen again.

I had a backup, but this had the corruptions in too (the number was steadily increasing!).

Unfortunately the database had to be deleted.

It will take 24hours before the stats are correct again. I will clean up the charts in a few days time.



Title: Re: Bitcoin p2p Network Status Charts.
Post by: Alex Thornton on October 07, 2011, 07:45:47 PM
Thanks for the update.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on October 16, 2011, 10:09:29 PM

Thought it was odd there were no version 5 clients.
It was odd! There was a typo in the command that generates the version charts. Now fixed. There are 28 running.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 04, 2011, 09:55:29 PM
Sorry - just found another bug as you can see!

It had been running perfectly for 28 days since the last issue.

It purges IPs from the berkdb that have not connected for over 28 days. As you can see at about 21:10 last night the thread that updates the database tried to purge some old ip's for the 1st time and threw an exception that caused it to exit. I have now added another "catch" and is up and running again. As before will take 24 hours for the stats to be in line again.



Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 04, 2011, 10:32:25 PM
Actually issue was that after the previous issue I made the database transactional, and never tested the delete process after this change. I now know that with Berk DB if the database is set to transactional you have to ensure you pass a transaction to the cursor when deleting!

I am starting to go off berkdb.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: finway on November 05, 2011, 02:19:32 AM
About listening nodes:

If one node's connections are full (can it be ) always, is it undetectable?



Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 05, 2011, 07:34:15 AM
It will be counted as a host, and listed in the country chart (as I will get an addr message from it).

But since I can not connect is will not be in the listening hosts or version charts.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 14, 2011, 11:04:57 AM
Sorry half crashed again.

Thought it was stable now so turned off logging to save on costs! Have turned logging back on now.
Stats will be good again in 24hours.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: EhVedadoOAnonimato on November 14, 2011, 01:15:49 PM
Should I consider that European Union means an aggregate of EU countries which are not already present on the list?
It's a bit confusing to see European Union with so many less nodes than many countries that are part of the Union...

PS: Great job by the way, thank you for such graphs. :)


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 14, 2011, 02:49:21 PM
Should I consider that European Union means an aggregate of EU countries which are not already present on the list?
It's a bit confusing to see European Union with so many less nodes than many countries that are part of the Union...

PS: Great job by the way, thank you for such graphs. :)

I am not sure. The site uses this database:
http://software77.net/geo-ip/
to map the IP to a location. And that is what comes up for those IP addresses.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: EhVedadoOAnonimato on November 14, 2011, 03:37:16 PM
And it seems the operators of that database aren't sure either. From their FAQ:

Quote
What does the Country code EU (European Union) mean?
The IP to country information in the database is provided 'as is' from the various registry sources. In some cases a country is only given as 'EU' which means it can be anywhere within the European union.

Maybe if you just move all EU IPs to Others, or change the description to "Unknown European Union" or something it would avoid confusions.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on November 14, 2011, 10:34:11 PM

Just gone off EC2 micro edition! I think something went wrong with the blockchain on the server and it was trying to do some big re-org or something. Net result was that it hit the limit of the micro-edition cpu and was throttled to 2% of its normal power! Net result of this was it all locked up and no matter how many times I restarted it would not fix itself. In end deleted block chain, redownloaded and all was fine.

Need to find a different host. Anyone got any ideas?

Requirements:
1) about £10 a month
2) Min 512Meg Ram (more would be nice)

Do not mind if it reboots or gets restarted on occasion as am not running a 24-7 service!

Suggestions were:
http://www.giga-international.com/?show=vserver
Some bad review though, and looks too cheap to be true! Also do not like the set-up fees feel it is a bit of a con?

http://www.cheapvps.co.uk/plans-openvz.php
£84 for a year looks a great deal.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Simon Barber on December 05, 2011, 11:30:57 PM
Looks like the stat gathering has stopped again - anything to do to help keep it running? I can offer to host something and maintain it if necessary.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: finway on December 08, 2011, 01:45:42 AM
Scale is a problem.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: muyuu on February 02, 2012, 07:04:34 PM
It's completely reasonable that the number of nodes steadily decreases as only up-to-date rigs are anywhere near profitable.

Bitcoiners can usually do some numbers, and even when they can't it becomes obvious at some point that it's not worth it to keep your old rig mining.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: fornit on February 02, 2012, 09:25:03 PM
It's completely reasonable that the number of nodes steadily decreases as only up-to-date rigs are anywhere near profitable.

Bitcoiners can usually do some numbers, and even when they can't it becomes obvious at some point that it's not worth it to keep your old rig mining.

cool story bro except this counts nodes not miners  :P


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on February 02, 2012, 11:05:24 PM
It counts full clients (i.e. the official C++ version).

It can not count the various Android/Java (bitspinner, multibit etc..) clients that do not transmit address messages.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: muyuu on February 02, 2012, 11:35:13 PM
It's completely reasonable that the number of nodes steadily decreases as only up-to-date rigs are anywhere near profitable.

Bitcoiners can usually do some numbers, and even when they can't it becomes obvious at some point that it's not worth it to keep your old rig mining.

cool story bro except this counts nodes not miners  :P

I understand in early times all users were both. So there is a progression to nodes vs miners with fewer nodes, and also more thin clients. I wasn't around, but I thought this was the case. Correct me if I'm wrong.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: fornit on February 03, 2012, 02:50:40 AM
most likely wrong. the transition from solo to pooled mining was mostly over when these statistics began.
i think the market share of the other clients is still pretty small though it might have some effect on the statistics. imho best explanation for the decrease in nodes is that the big media attention last summer brought many new users that were only superficially interested in bitcoin but installed the client with run on startup enabled. many lost interest quickly and are now actively uninstalling or more like just switching/reinstalling operating systems and dont bother installing bitcoin again because they never really used it in the first place.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: muyuu on February 03, 2012, 07:40:25 AM
most likely wrong. the transition from solo to pooled mining was mostly over when these statistics began.
i think the market share of the other clients is still pretty small though it might have some effect on the statistics. imho best explanation for the decrease in nodes is that the big media attention last summer brought many new users that were only superficially interested in bitcoin but installed the client with run on startup enabled. many lost interest quickly and are now actively uninstalling or more like just switching/reinstalling operating systems and dont bother installing bitcoin again because they never really used it in the first place.


Are there any older stats on number of nodes available?


Title: Re: Bitcoin p2p Network Status Charts.
Post by: fornit on February 03, 2012, 03:57:47 PM
not to my knowledge, no.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: gmaxwell on February 05, 2012, 09:28:41 AM
for example the number of hosts,

It's worth mentioning that the (non-listening) nodes figures will probably drop substantially as the result of some new node behavior.

First, there are the announcement changes (https://github.com/bitcoin/bitcoin/pull/792) where nodes which aren't listening or arn't current with the block-chain will not announce their addresses to the network.

Second, the stochastic address manager (https://github.com/bitcoin/bitcoin/pull/787) will likely reduce the propagation of unreachable nodes so that old and never working addresses will probably disappear faster rather than circulating through the network like undead zombies.

Some of this may be counterbalanced by UPNP fixes (https://github.com/TheBlueMatt/bitcoin/commit/177dbcaace432f46b191add5c26226dbaac2c81c) increasing listening nodes, but this fix needs testers and isn't yet even in the pipeline for upstream until it gets some.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Red Emerald on February 18, 2012, 05:58:42 PM
http://bitcoinstatus.rowit.co.uk/versions.html

How are you getting the versions of all the nodes?  I'm wanting to write a small script to connect to all of the nodes listed at https://en.bitcoin.it/wiki/Fallback_Nodes#Tor_nodes and get their version.

I started tinkering with libbitcoin, but it's alpha.  Since you wrote this site long before that code was around, I'm curious how you are doing it.

Also, where is version 502?  And I don't think "other" is working since it's showing zero.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: nibor on February 19, 2012, 02:47:31 PM

I have a client running that connects to all the nodes on the network every 24hours and gets a version message from them.
Client is java using bitcoinj.

Specific class for this is:
http://code.google.com/p/bitcoinj/source/browse/src/com/google/bitcoin/core/VersionMessage.java


Title: Re: Bitcoin p2p Network Status Charts.
Post by: ThePok on May 19, 2012, 09:57:40 PM
downtrend seems to be stopped :)


Title: Re: Bitcoin p2p Network Status Charts.
Post by: gmaxwell on May 20, 2012, 06:37:56 AM
downtrend seems to be stopped :)

They fixed some problems the system was having, so the data looks more sane now but not completely sane.

Note, the estimates of bitcoin client are now ~worthless: A few versions ago I changed the reference client to not advertise itself unless it was listening and knew its public IP... so it's expected that that count should go way down.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: lucb1e on August 18, 2012, 06:00:27 PM
Are these stats still functional? It would appear there are much less hosts than a year ago, but I read that since v0.6 it doesn't automatically connect to IRC anymore or something... Perhaps this is how the stats worked, and only some people run an old version? The website doesn't seem to suggest that's how the stats work, but still I wonder if btc is loosing users (and loosing masses, or so it would appear).

Edit: Oh, read the post above me now ^^
Note, the estimates of bitcoin client are now ~worthless


Title: Re: Bitcoin p2p Network Status Charts.
Post by: Simon Barber on April 07, 2013, 01:02:35 AM
These stats have stopped updating. Any chance of reviving them? I can take over maintenance of the code if necessary.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: weex on May 16, 2013, 10:36:01 PM
I would also be interested to help make a Litecoin version of this as well as get the Bitcoin version running more smoothly.


Title: Re: Bitcoin p2p Network Status Charts.
Post by: malevolent on May 16, 2013, 11:43:08 PM
It's completely reasonable that the number of nodes steadily decreases as only up-to-date rigs are anywhere near profitable.
Bitcoiners can usually do some numbers, and even when they can't it becomes obvious at some point that it's not worth it to keep your old rig mining.
cool story bro except this counts nodes not miners  :P
I understand in early times all users were both. So there is a progression to nodes vs miners with fewer nodes, and also more thin clients. I wasn't around, but I thought this was the case. Correct me if I'm wrong.

Not necessarily all users. The default client had an in-built mining option but not everyone was willing to run it non-stop when bitcoins where worthless (especially laptop users would get easily discouraged after noticing the extra heat).