← Ongoing work

In progress

Modelling and Verifying the Cardano Peer-to-Peer Network

CSP models of Cardano's node-to-node mini-protocols and network multiplexer, mechanised in Agda, with proofs of deadlock freedom, divergence freedom and refinement against specifications.

Problem

Cardano nodes communicate through the Ouroboros node-to-node mini-protocols, multiplexed over shared TCP connections. Each protocol is simple in isolation, but correctness questions arise from their composition: can the network deadlock or diverge, and does the multiplexer behave like an ideal medium?

Approach

The models are written in CSP as process trees using csp-ptree-agda, and reasoned about in the traces, failures and failures-divergences models, divergence-respecting weak bisimulation and LTL.

Results so far

Results hold for the stated models and parameters. Some developments are still being ported to the current link-indexed model, as recorded in the repository.

How to use it

The models need Agda 2.8.0, csp-ptree-agda and the standard libraries. Type-check a module from src/Network_CSP_Model, for example agda Cardano_network/ChainSync.agda. The repository READMEs give a reading order and the memory limits for the larger proofs.

Resources