Ad

Detect If An IP Address Is Running A Bitcoin Node

- 1 answer

Is there a way to detect if an IP address is running a Bitcoin node? Maybe I can extract the IP information from the blockchain somehow?

Ad

Answer

There are many ways to do this.

Pretty reliable and relatively simple way is to get the list of Bitcoin nodes from https://api.blockchair.com/bitcoin/nodes. It is the JSON object that looks like:

{"data":{"nodes":{"1.234.63.142:8333":"version":"\/Satoshi:0.16.0\/","country":"KR","height":588031,"flags":1037},
"1.36.226.179:8333":{"version":"\/Satoshi:0.18.0\/","country":"HK","height":588031,"flags":1037},
"100.12.85.110:8333":{"version":"\/Satoshi:0.16.2\/","country":"US","height":588031,"flags":1037},
...

And then check if IP address in question is present in this list.

Ad
source: stackoverflow.com
Ad