Reviewed Aug 2026
DE
BA-09 · LESSON 01

Peer discovery and handshakes

KEY DEFINITIONS

Terms used in this lesson

P2P
Peer-to-peer: nodes communicate directly with other nodes rather than through one central server.
DNS
Domain Name System: a naming service Bitcoin can use during peer discovery without trusting it to validate chain data.
TCP
Transmission Control Protocol: the reliable network connection over which a traditional Bitcoin peer session can exchange messages.
NODE_NETWORK
A Bitcoin peer service flag claiming that the peer can provide complete block data under the protocol's service rules.
Proof-of-work target
The maximum header-hash value accepted for a block; lowering it makes valid hashes harder to find.

Nodes discover peers, negotiate services, and exchange inventory without a central network registry.

35 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

Bitcoin's peer-to-peer (P2P) network has no central peer directory. A node can learn addresses from configured seeds, Domain Name System (DNS) seeds, prior address records, or connected peers. A Transmission Control Protocol (TCP) connection becomes a Bitcoin peer session after each side sends a version message and acknowledges the other's version with a version acknowledgement (verack) message. Those messages exchange protocol version, service claims, time, and synchronization information.

GUIDED EXPLANATION1/5 ideas inspected
1

Obtain candidate addresses

A fresh node queries seed sources for initial routable peers, while an established node uses its locally stored and peer-supplied address manager.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionThe peer advertising the highest block height becomes a new node's trusted chain source.

Starting height is only a hint. The node downloads and validates headers and blocks, and chainwork selects among valid branches.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.