Skip to content
snapshot

Transport

QUIC (Quinn + rustls), TLS 1.3 mandatory with mutual auth pinned to Ed25519 node identities. Nothing is readable on the wire. Every figure below is the node's real [transport] config or a real loopback measurement.

How data actually moves between machines — QUIC, a fast encrypted internet transport (TLS 1.3, mutual auth) — and the knobs that trade latency for throughput.

Impact: Results stream quickly and privately; right-sizing the flow-control window and using parallel streams is what lets a long-distance link reach full speed.

Transport
QUIC
Quinn + rustls
Security
TLS 1.3
mTLS · Ed25519
Congestion
cubic
control algorithm
0-RTT
disabled
session resumption
Best throughput
9 MB/s
measured loopback
Best parallelism
×4
124,869 rows/s
Measured loopback benchmark
Real result-stream throughput vs. parallelism — 80,000 rows, single host, no network. Throughput jumps from parallelism 1→2 then plateaus: real bandwidth-delay-product behavior on loopback.
best p50
4ms
peak
9 MB/s
ParallelismRows / secMB / secp50
×159,5674.34ms
×2121,8718.74ms
×4best124,86994ms
×8124,1028.94ms

Bench command

reproduce locally
cargo test -p p2p-node --test benches -- --nocapture
P2P_BENCH_ROWSP2P_BENCH_PARALLELISMP2P_BENCH_COMPRESSIONP2P_BENCH_CONGESTION

Real measurements from cargo test --test benches on this machine (engine mock-1).

Tuning
Per-link transport knobs under [transport]. Every control is seeded from this node's real configured defaults; changes are previewed live below.

config default: cubic

config default: none · min 64.0 KB

max uni-streams256
send window64.0 MB

config default: off — size windows from bandwidth × RTT

1 stream

concurrent unidirectional QUIC streams per call · config default ×1

1,000 Mbps
50ms
Estimate
derived from the config on the left
Estimated max throughput
0.40Gbps
400 Mbps · 1 streams · no compression
Flow-control window (fixed send window)
64.0 MB
send_window_bytes (BDP off)
cc=cubic comp=none streams=1
gso=on gro=on pacing=on
0rtt=off bdp=off

Sim seeded from the node's real configured defaults. Measured throughput is the loopback benchmark above (9 MB/s); this estimate models a WAN link.

What's tunable under [transport]
Every knob is config-driven and most are overridable per call.
KnobConfig fieldDescription
Wire compressioncompression.algorithmnone / lz4 / zstd — trade CPU for bytes on the wire (over min_size)
Congestion controlquic.congestionbbr · cubic · newreno, with optional packet pacing
GSO / GRO offloadquic.gso · quic.grobatch UDP datagrams through the NIC to cut per-packet syscall cost
Result-stream parallelismresult.parallelismfan results across multiple uni-streams once over parallel_min_bytes
BDP flow-control targetquic.bdpderive send/receive windows from bandwidth × RTT instead of fixed bytes
0-RTT / session resumptionquic.enable_0rttskip a full handshake RTT on reconnect to a known peer
Per-worker latency (plotly box)
Distribution of commit latencies per worker across the run.
loading plot…
Throughput vs parallelism (plotly)
Measured loopback transfer — doubles 1→2, then plateaus (BDP).
loading plot…