← Ongoing work

In progress

Verifying the Cardano Connection Manager

A source-derived formal model of the Cardano network's connection management, used to confirm design guarantees, report issues and suggest fixes.

Problem

The connection manager in ouroboros-network shares connections between inbound and outbound use and coordinates handshakes, handler threads and shutdown. Races in this concurrent code are difficult to find by testing alone, and a connection-state diagram hides many of the interleavings that matter.

Approach

The work models the connection manager, the inbound and outbound governors, server admission, and selected handler, multiplexer and protocol lifecycles, derived from fixed source revisions. It separates logical connection state from physical thread completion, and treats map updates, STM commits, cancellation and cleanup as distinct events.

The evidence comes in kinds that complement each other:

Results so far

The guarantees hold for the model under its stated premises and scope. There is no full refinement theorem from the model to the Haskell code and no universal progress result, as the project summary records.

Resources