Menu

Distributed systems

LP2LN architecture: peer discovery, application IPC and content storage

How the Rust-based LP2LN stack separates the peer runtime, the application interface and content-addressed storage, with a guide to its public tests.

Egor DudkinCode snapshot · 27 October 2026
Application
Typed App Plane commands and events
Peer runtime
Discovery, connections and transports
Content storage
Addressed blocks, manifests and encryption
LP2LN interfaces, from application to network and storage

LP2LN v2 separates three jobs that evolve at different rates: keeping peers connected, exposing networking to applications, and turning files into addressable blocks. This note describes those interfaces at a pinned public revision and identifies what can be verified at each boundary.

Peer discovery and the node runtime

The runtime lives in lp2ln-core-v2. The current design gives peers equal roles and uses initial peer addresses to enter the network. The daemon, lp2lnd, reads those initial addresses from configuration. Bootstrapping gives a new node its first reachable contact. The runtime can then discover and maintain peer connections through the network, without a separate signaling-server role.

This distinction matters in deployment. Removing a dedicated coordinator still leaves a reachability problem: a fresh node must know how to reach at least one peer. A useful smoke test therefore starts a node with a known address, points a second node at it, and checks discovery, connectivity and the health endpoints. The daemon's local multi-node runner is a separate tool for running virtual peers on one host.

Application IPC and the App Plane

A sidecar application connects to its local daemon through the App Plane. The documented interface uses a Unix socket or development TCP, and the Rust SDK packages the framing into typed commands and events. Keeping framing here lets application code work with application messages while the node owns peer connectivity.

The public SDK smoke test uses a mock IPC host. It checks the protocol handshake and exercises subscription and stream operations on that local boundary. A second test across two live network peers would cover a different question: whether the full message path survives transport and topology changes.

Content addressing and storage

The lp2ln-content crate contains content identifiers, chunk encryption, manifests and block stores. The crate's public module deliberately keeps peer routing and the node runtime outside its interface. A file representation can be tested locally against a block store, while discovery, transfer and repair belong to the network layer.

BoundaryPublic interfaceUseful check
Peer runtimeNode options, transports, peer maintenanceVerify that a second node can join through its configured initial peer.
Application IPCTyped commands and events over the local App PlaneExercise the SDK against the mock IPC host, then verify the message path across live nodes.
Content storageContent IDs, manifests and block storesCheck that chunks and manifests round-trip before exercising network transfer.

Validation and limits

The commands below invoke tests defined in the pinned workspace. The topology regression checks graph properties in modeled steady and churn scenarios. The size sweep prints connectivity and degree metrics across modeled node counts. It measures the simulator's scenarios. A throughput or latency claim needs a separate live transport test with reported machines, links, payload sizes, offered load and actual deliveries.

cargo test -p lp2ln-app-sdk --test smoke
cargo test -p lp2ln-core-v2 --test topology_sim_regression
cargo test -p lp2ln-core-v2 --test topology_sim_size_sweep -- --nocapture

This article is an architecture review of the public revision listed in Sources. It reports no new benchmark measurements or claims about a production deployment.

Sources

Related projects