<p>I'd like to note that Bitcoin P2P libraries for C# are also available in NBitcoin and the Stratis fullnode.</p>

CC BY-SA 3.0
2018-02-09T17:26:57.547Z
2018-02-09T17:26:57.547Z
Dan Gershony
<p>Bitcoin has its own custom wire protocol using TCP. Peer discovery is by address rumoring, where connected nodes gossip about other potential available peers. When a node is new and has nobody to gossip with, they make a DNS lookup of specific hostnames which provide a number of known-good peers to make an outgoing connection to. If DNS seeds fail and none of the known peers are good, Bitcoin Core nodes fall back to a set of hardcoded peers as a last resort.</p>
<p><a href="https://developer.bitcoin.org/devguide/p2p_network.html#peer-discovery" rel="nofollow noreferrer">https://developer.bitcoin.org/devguide/p2p_network.html#peer-discovery</a></p>
<p>Bitcore, BitcoinJ and python-bitcoinlib all have basic implementations of the wire protocol in JavaScript, Java and Python respectively. It is fairly simple to interact with nodes but misbehavior (such as sending invalid data) will cause the remote peer to ban you.</p>

CC BY-SA 4.0
2015-09-04T02:00:53.257Z
2024-06-13T20:17:00.940Z
2024-06-13T20:17:00.940Z
Claris
<p>I am wondering if there is a standard/de facto P2P library/implementation/spec used by Bitcoin Core and other implementations of Bitcoin?</p>

<protocol><network>
What is the P2P technology/protocol used by Bitcoin to find nodes and distribute messages across them?
Peter Mel
# What is the P2P technology/protocol used by Bitcoin to find nodes and distribute messages across them?

(Asked by: username_0 on 2015-09-04)

I am wondering if there is a standard/de facto P2P library/implementation/spec used by Bitcoin Core and other implementations of Bitcoin?

**Tags:** protocol, network


---

## 2 answers

### Answer by username_2 on 2015-09-04. Score: 10 | Accepted answer

Bitcoin has its own custom wire protocol using TCP. Peer discovery is by address rumoring, where connected nodes gossip about other potential available peers. When a node is new and has nobody to gossip with, they make a DNS lookup of specific hostnames which provide a number of known-good peers to make an outgoing connection to. If DNS seeds fail and none of the known peers are good, Bitcoin Core nodes fall back to a set of hardcoded peers as a last resort.

<https://developer.bitcoin.org/devguide/p2p_network.html#peer-discovery>

Bitcore, BitcoinJ and python-bitcoinlib all have basic implementations of the wire protocol in JavaScript, Java and Python respectively. It is fairly simple to interact with nodes but misbehavior (such as sending invalid data) will cause the remote peer to ban you.


---

### Answer by username_1 on 2018-02-09. Score: 1

I'd like to note that Bitcoin P2P libraries for C# are also available in NBitcoin and the Stratis fullnode.


---

