BOMBARCHIVE
Explore

A living reference collection. Written in the wiki, preserved in Git.

The archiveBitcoin

Old revision: Bitcoin peer discovery

archive: document contemporary 2010 IRC seeding debate and LFnet switch

Bitcoin peer discovery is the process by which a newly started Bitcoin node finds other nodes to contact. It is a bootstrapping mechanism, not a Bitcoin consensus rule. A node needs an initial reachable peer, but the service that supplies a candidate address does not thereby gain authority over valid blocks or transactions.

Bitcoin's early client used Internet Relay Chat (IRC) for this purpose. Fixed seed addresses and DNS seeds later reduced dependence on IRC, which was first disabled by default and then removed. The distinction between those last two events has sometimes been lost in retrospective timelines.

2009: IRC as an address directory

In the source tagged v0.1.5, irc.cpp takes a peer's IPv4 address and port, packs them into a six-byte structure, encodes them with Base58Check and prefixes the result with u. A routable node could advertise this encoded address as its IRC nickname; a node without a routable address used a random nickname prefixed with x. Bitcoin v0.1.5 IRC source

The client contacted chat.freenode.net on port 6667, joined #bitcoin and issued WHO #bitcoin. It decoded suitable nicknames into candidate Bitcoin node addresses. The same file includes a fallback numeric address for reaching the IRC server. That is not a hard-coded address of Satoshi's Bitcoin node or a trusted chain server. Direct source

Once connected to a Bitcoin peer, a client could exchange addresses using addr and getaddr messages. IRC helped with introduction; Bitcoin networking continued without routing its transaction history through that channel. Direct networking source

The source proves how the mechanism was programmed. It does not identify every peer that actually occupied the channel or independently prove that their advertised listening ports were reachable.

2010: fallback seeds and LFnet

The v0.2.12 networking code includes a fixed pnSeed array of IP addresses, introduced in a comment as fallback nodes if IRC was not working. These were candidates for contacting the network, not permanently trusted validators. Bitcoin v0.2.12 source

The change of IRC network was discussed before the software switched. On 15 March 2010, soultcer reported that a Freenode staff member had noticed Bitcoin's automated channel because it resembled a botnet command channel. Satoshi replied on 16 March that IRC had been intended as a temporary way to accommodate early nodes with changing IP addresses, whereas Bitcoin's built-in addr mechanism could distribute peer lists after first contact. Laszlo Hanyecz offered irc.lfnet.org, a network he helped operate, on 14 June. On 18 June, Satoshi reported that the SVN version now tried IRC first and fell back to hard-coded seed nodes. These are contemporary first-party explanations and implementation-status reports, not direct measurements of network availability. Contemporary design discussion

On 25 June, Xunie posted IRC log excerpts showing Freenode K-line disconnections of Bitcoin nicknames. The Madhatter later reported rapid connections from experimental nodes and suspected that his testing had contributed, without demonstrating the full scope of the incident. Satoshi explained that a new installation of Bitcoin 0.2 still required IRC for initial discovery, while 0.3 could bootstrap without it. On 26 June Satoshi announced 0.3.0.RC2 using LFnet and said Freenode's visibility among other users and moderators made Laszlo's network a better fit. The tagged v0.3.0 IRC source corroborates the change of hostname. The posts establish the participants' stated reasoning; they do not prove that the entire Bitcoin network became inoperable. Contemporary incident and release discussion · Bitcoin v0.3.0 source

2011: DNS and multiple IRC channels

Version v0.3.21 contained a DNSAddressSeed() implementation with two DNS seed hostnames. Startup invoked it only when the -dnsseed option was present. This was opt-in, not yet the normal bootstrap path. DNS seed implementation · Startup condition

For mainnet, the IRC code in v0.3.22 randomly selected one of the numbered channels #bitcoin00 through #bitcoin99; testnet instead used #bitcoinTEST. These channel names served address discovery; their presence does not establish one hundred separate human communities. Direct source

The same IRC implementation did more than collect addresses. It sent USERHOST to ask the IRC server which IP address it observed for the node's connection. If the returned address was routable and the node was not using a proxy, the client updated its local advertised IP and changed its encoded nickname before joining a channel. The seeding thread also exited for -connect mode or a node not accepting inbound connections. This code discovers and advertises an externally observed address; it does not test whether the advertised Bitcoin listening port is reachable. Bitcoin v0.3.22 IRC implementation

By v0.3.24, DNSAddressSeed() was called by default unless -nodnsseed was supplied. The default route for obtaining candidate peers had changed without changing Bitcoin's chain-validation rules. Startup code

2012–2013: off by default, then removed

The v0.6.0 help text states -irc has default: 0, while -dnsseed has default: 1. IRC support remained available as an option; startup code separately enabled it for testnet unless overridden. v0.6.0 option defaults

At v0.8.1, src/irc.cpp was still present and explicitly checked for the opt-in -irc setting. At v0.8.2, the file was gone, its option was absent from startup help and the release notes explicitly recorded the removal of IRC seeding support. A 2023 answer by Bitcoin developer Pieter Wuille dates removal to 0.9.0; the earlier versioned code and release note provide the firmer boundary. Later expert account · v0.8.1 source · v0.8.2 startup code · v0.8.2 release notes

Not the BitDNS IRC record

BitDNS documents a November 2010 forum discussion whose author says the idea began in an IRC conversation. That statement does not by itself identify the same IRC channel, purpose or set of participants. The machine-readable peer directory and the human design discussion should not be merged into a single episode. Contemporary forum thread

Interpretation and open evidence

The movement from IRC to fixed addresses and DNS shows that peer introduction can evolve without redesigning Bitcoin consensus. It also shows why repository archaeology needs careful verbs: implemented, enabled by default, optionally available and removed are not interchangeable.

Open question
Recover dated 2009-era IRC logs showing actual node advertisements, rather than inferring occupancy or reachability from code.