Background

A few months ago, I was curious to learn more about which reference client implementations of the bitcoin protocol were running on the network. Although this can be achieved through various readily available resources, it felt like I was trusting these entities in reporting on this honestly. I therefore set out to investigate just how this can be achieved so that I may verify and compare these for myself.

Let's do it!

We'll start off by having a look into the contribs folder on the bitcoin core client implementation.

lastSuccess - This is a unix epoch timestamp of the last successful attempt with this node

%(2h)/%(8h)/%(1d)/%(7d)/%(30d) - Various time intervals providing stats on availability

blocks - Block height recorded on node

svcs - list of supported services

version - Version and User Agent String / Sub Version

This information can be used to do some neat analysis indeed! But we're still trusting sipa right? So, how is this list generated? Well, lucky for us, sipa has been friendly enough to share the tool and source code which generates this data for us here https://github.com/sipa/bitcoin-seeder!

Bitcoin-seeder is a crawler for the Bitcoin network, which exposes a list of reliable nodes via a built-in DNS server.

Features:

regularly revisits known nodes to check their availability

bans nodes after enough failures, or bad behaviour

accepts nodes down to v0.3.19 to request new IP addresses from, but only reports good post-v0.3.24 nodes.

Conclusion

In this tutorial we had a look at how we can generate our own data from which we can start doing various cool analytics. If you enjoyed this tutorial and would like to see more like them, please leave some comments and suggest topics you'd like to see covered by the bitcoin developer network community!

Explore Website

About Bitcoin Developer Network

The Bitcoin Developer Network (BDN) is a community-driven project looking at educating the generation of Bitcoin developers. We invite developers, authors, editors, proofreaders, enthusiasts, subject matter experts and technical writers to get in touch so that we may reduce the barrier to entry in developing solutions at various layers of this technology.

Bitcoin Developer Network Newsletter

Enter your email address to subscribe to this blog and receive notifications of new posts by email.