From rusty at rustcorp.com.au Thu Feb 20 09:29:33 2020 From: rusty at rustcorp.com.au (Rusty Russell) Date: Thu, 20 Feb 2020 19:59:33 +1030 Subject: [Lightning-dev] Using libp2p as a communication protocol for Lightning In-Reply-To: References: <623aca48-9ac3-463b-94e1-10e11a3b9790@Spark> <77B019C6-4C68-4505-A57C-C5387E018F0E@mattcorallo.com> Message-ID: <87lfoxmwsi.fsf@rustcorp.com.au> Bastien TEINTURIER writes: > Exactly what Matt said. > > I would also add that libp2p aims to be a kind of swiss-army knife for p2p > networking: that's nice for many use-cases, but when security is your main > focus, it's not. > Look at TLS: most attacks are downgrade attacks because the protocol offers > way too many options. > Protocols like Wireguard have perfectly understood this. No options, not > many configuration hooks -> small, auditable codebase. > > For lightning it's the same: we prefer a very simple transport that has no > options whatsoever. > Simple to implement, simple to test, and works great in practice. To add to this: at Milan we chose a raw protocol instead of using protobufs. At the time I was unsure, but being able to specify each message down to the bit level has meant we've never really had problems at that level. But it did mean we wasted time arguing over endianness, etc! Cheers, Rusty.