BITCOIN MAINNETLive explorer status
NO ONE IN CHARGE

The peer-to-peer network

Bitcoin nodes connect to a handful of peers and pass on new transactions and blocks, so news spreads worldwide in seconds. Learn how gossip works.

Gossip

There's no central server. Each node connects to some peers (by default 8 outgoing connections in Bitcoin Core, plus extra block-relay-only ones) and can accept incoming connections on port 8333.

A new transaction spreads peer to peer, each node checking it before passing it onnew transactioneach node checks it, then passes it to its peers
A new transaction spreads peer to peer, each node checking it before passing it on

When a node learns of something new, it tells its peers it has it (an "inv" message). Peers that don't have it ask for it, check it, and tell their peers. Within seconds, most of the network knows.

Finding peers

A brand-new node uses DNS seeds (domain names run by community members that return addresses of active nodes) and a hardcoded fallback list. After that, nodes exchange addresses of other peers.

Faster blocks

  • Compact blocks (BIP 152): peers usually already have most of a block's transactions in their mempool, so a node sends only short IDs and the receiver rebuilds the block.
  • Faster relay means fewer stale blocks.

Privacy and resilience

  • Transactions are relayed with small random delays, which makes it harder to tell which node created them.
  • Nodes can connect over Tor or I2P to hide their IP address.
  • Connecting to diverse peers protects against an eclipse attack, where an attacker surrounds a node with only their own peers.

How fast is the network?

A new block usually reaches the vast majority of reachable nodes within a few seconds, thanks to compact block relay. Unconfirmed transactions spread more slowly on purpose: small random delays protect the privacy of the sender.

Inbound vs outbound connections

OutboundInbound
Who starts itYour nodeAnother node
Default in Bitcoin Core8 full-relay plus 2 block-onlyUp to the connection limit, if port 8333 is open
PurposeGet data you can trustHelp other nodes
Share this guide
Share on X ↗

Key takeaways

  • Nodes connect to peers and gossip new transactions and blocks.
  • New nodes find peers via DNS seeds.
  • Compact blocks and diverse connections make the network fast and resilient.

Common questions

How many nodes are there?

Tens of thousands of reachable nodes are visible publicly, plus many more that don't accept incoming connections. Exact numbers can't be known.

Does my node need an open port?

No. It works with outgoing connections only, but opening port 8333 helps the network.

What port does Bitcoin use?

Port 8333 for mainnet peer-to-peer connections.

Can someone block my node from the network?

Diverse peers, Tor or I2P, and manual trusted peers make that very hard.