Chapter 7 — Networks and protocols
Lesson map
Lesson 07 published. Map, example, EX019.
flowchart TD
N0["Learning outcomes"]
N1["7.1 Layered networking"]
N2["7.2 Peer-to-peer gossip"]
N3["7.3 Securing node communication"]
N4["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4
N4 --> EX["Worked example"]
EX --> Q["Exercise EX019"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["7.1 Layered networking"]
N2["7.2 Peer-to-peer gossip"]
N3["7.3 Securing node communication"]
N4["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> Q["EX019"]
[Learning outcomes]
|
v
[7.1 Layered networking]
|
v
[7.2 Peer-to-peer gossip]
|
v
[7.3 Securing node communication]
|
v
[Synthesis]
|
v
[Worked example] --> [Exercise EX019]
Learning outcomes
You will (1) explain layered networking; (2) describe peer-to-peer gossip; (3) secure node communication.
7.1 Layered networking
Networks are organised in layers. The physical and link layers move bits between nearby devices; the internet layer routes packets between networks; the transport layer provides reliable streams; the application layer carries meaning, such as blocks and transactions. Sofia learns the layers so she can locate a problem: a node that cannot reach peers may have a firewall issue at the transport layer rather than a ledger bug. She draws the cooperative's three validators in different rented data centres, connected over the public internet, and marks which ports each must open to its peers and to the shop's point-of-sale terminal.
7.2 Peer-to-peer gossip
Blockchain nodes usually share transactions and blocks by gossip: each node tells its peers about new data, and they tell theirs. Nakamoto's paper describes broadcasting new transactions and blocks to all nodes. Gossip is resilient, because there is no single server to fail, but it means a node is only as informed as its peers. A validator connected to too few peers may fall behind. Sofia configures each validator to connect directly to the other two and to refuse unknown peers, because the ledger is permissioned. That small allow-list removes a whole class of problems that open networks must handle in other ways.
7.3 Securing node communication
Even on a permissioned ledger, traffic crosses the public internet. Sofia recommends encrypted, authenticated connections between validators, so that data cannot be read or altered in transit, and a firewall that allows only the known peers and the shop terminal. Administrative access uses separate keys and is restricted to two named volunteers. She also asks the hosting provider how network logs are kept. The design follows NIST IR 8202's observation that permissioned networks rely on access control rather than open participation. Network security protects the ledger before any contract code runs.
Worked example
Sofia restricts validators to a three-node peer allow-list, encrypts and authenticates links, and limits administration to two named volunteers.
Synthetic case. The network design is synthetic; Nakamoto (2008) and NIST IR 8202 are real sources.
Errors and limits
Exposing a permissioned validator to unknown peers removes the main advantage of being permissioned.
Exercises
- EX019 — Fault location. Why learn the layers? Rubric: 3 = to locate problems such as a firewall at the transport layer;; 2 = locate faults;; 1 = to memorise names;; 0 = none.
- EX020 — Gossip weakness. What is a weakness of gossip for one node? Rubric: 3 = it is only as informed as its peers;; 2 = few peers;; 1 = vague;; 0 = none.
- EX021 — Peer policy. What peer policy does Sofia configure? Rubric: 3 = connect to the other two and refuse unknown peers;; 2 = allow-list;; 1 = accept all;; 0 = none.
Synthesis
Layered networking knowledge and restricted, encrypted peering protect a permissioned ledger.
Continue studying — chapter 07 of 40
← Chapter 06 (draft) · Course chapter index · Chapter 08 (draft) →