libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.56k stars 273 forks source link

Proposal: Privacy Preserving Metrics #504

Open marten-seemann opened 1 year ago

marten-seemann commented 1 year ago

I’ve discussed this with various people over the last year or so, but we never wrote up a tracking issue. It’s already part of our roadmap: https://github.com/libp2p/specs/blob/master/ROADMAP.md#%EF%B8%8F-telemetry-protocol.

The proposal is to provide a generalized way to collect metrics that can be used by libp2p services (e.g. hole punching, swarm dialers, etc.) as well as libp2p users. Metrics collection should happen in a privacy preserving way, enabling us to turn on metrics by default without users having to give up their privacy, as would be the case in a more traditional metrics collection system.

There’s interesting work going on in the IETF PPM working group at the moment: They’re working on a protocol where a node reports a measurement value to two separate aggregator nodes (which are assumed to not collaborate). Through some fancy cryptography, the aggregators 1. run some sanity checks on the value (e.g. make sure that it’s within a certain value range) and 2. compute an aggregated value, which, when combined with the value derived by the other aggregator, yields the desired result (e.g. the average value over all measurements).