Bitcoin in Practice: Bitcoin Server Network (BSN)
By Kurt Wuckert Jr.
Bitcoin Server Network (BSN), the node’s communications layer
Most people talk about mining and blocks, but a node also needs a serious networking subsystem. In the material you provided, that subsystem is called the Bitcoin Server Network (BSN). It is essentially a new name for what used to be called the P2P network, and the original “peer to peer” label came from the idea that nodes connect to other nodes as peers.
The “server” part of BSN is an analogy. Nodes act like servers for applications that use the blockchain, similar to how a client-server setup works in normal web architecture. The BSN is the outward-facing part of the node software that handles connections and message exchange with other nodes.
At a high level, the BSN exists to connect to peers and manage network messages, including:
New blocks
New transactions
Chain state information
Block headers on demand
Full blocks on demand
It also handles node identity and the practical job of maintaining connections with any other node that wants to connect.
Peer Connector, how messages enter the node
The Peer Connector is described as a component built from underlying modules (from a suite called JCL) plus a message router.
The important idea is: messages coming from other nodes are consumed by this connector, then injected into the rest of the node software through the router. A finite number of peers connect to a given JCL instance, and that JCL instance connects onward to its message router.
Two specific JCL modules are called out:
JCL-Net, the networking engine
This module provides the core capabilities for connecting to, listening to, and reacting to the blockchain network. In practical terms, it covers the mechanics that make a network connection behave like a real system instead of a fragile demo:
Handshake protocol
Timeout behavior, including ping/pong keep-alives
Node discovery
Blacklisting
It also provides event streams and notifications, and supports requests that the network layer can fulfill, like asking a peer for a specific transaction or block.
JCL-Store, storage for exchanged data
This part provides operations to save and retrieve blocks and transactions that are received or sent during communication with other nodes. In other words, as the node exchanges data across the network, JCL-Store is part of how that data can be persisted and fetched when needed.
Peer Manager, keeping your connections organized
Once you can connect to peers, you need to manage them. That job belongs to the Peer Manager.
The Peer Manager:
Organizes and maintains connections to other nodes via the JCL layer
Tracks information about peers
Directs P2P communications
Maintains peer info and statistics over time
That peer data is persisted into two stores:
Peer-Store, identity and status
The Peer-Store captures critical identity information and current status for each connected peer, such as:
IP address
Port
Stream status
Peer status markers, like dead, alive, banned, penalized, unknown
Peer-Statistics store, message and performance tracking
The Peer-Statistics store records statistical information about messages exchanged with each peer, and also captures performance-related communication data.
That data is used for a scoring process, and the score helps determine what happens next with a peer, whether they remain active, or whether they get blocked.
ELI5(ish...)
Think of a bitcoin node like a busy restaurant kitchen.
Mining and block building is the cooking.
The BSN is the phone lines, the delivery apps, and the staff handling incoming orders and outgoing deliveries.
If the restaurant cannot take orders or talk to delivery drivers, it does not matter how good the cooks are, it will not function.
BSN connects your node to other nodes, keeps the connections alive, and moves messages around. It handles things like, “here’s a new transaction,” “here’s a new block,” or “send me the headers for the chain.”
The Peer Connector is like the front desk that receives calls and routes them to the right place. JCL-Net is the part that knows how to dial, handshake, keep the line alive, and blacklist troublemakers. JCL-Store is the filing cabinet for what you sent and what you received.
The Peer Manager is like a manager keeping a list of reliable delivery drivers and sketchy ones. Peer-Store is their contact card and status. Peer-Statistics is the logbook of how often they show up, how fast they respond, and whether they are causing problems. Over time, that score decides who stays on the list and who gets cut off.