From aj at erisian.com.au Mon Oct 19 23:55:01 2015 From: aj at erisian.com.au (Anthony Towns) Date: Tue, 20 Oct 2015 09:55:01 +1000 Subject: [Lightning-dev] Specifications of Broadcasting Layers In-Reply-To: <87mvvfy97l.fsf@rustcorp.com.au> References: <87mvvfy97l.fsf@rustcorp.com.au> Message-ID: <20151019235501.GC18268@navy> On Mon, Oct 19, 2015 at 11:18:30AM +1030, Rusty Russell wrote: > > (1) Pubkey-Channel-Relationships (see other post on ML) > > Very static, relayed every 10 days // 264 Bytes > > (2) Node addresses/IP > > ... approx every 12h // 133 Bytes [...] > > (3) Channel-Status (capacity, fee, ...) > > ... once an hour? // 176 Bytes [...] > These estimates seem about the right ballpark to me. But once per hour > may be extremely optimistic when channels approach exhaustion. > Yeah, my design point has been 1M nodes. Ideally, on a cell phone :) > In the very short term, Bitcoin used IRC as the peer protocol. It has > the advantage of being really easy to debug, and trivial to implement, > so I'm going to aim at that while we research our more ambitious > proposals... I'm totally a fan of being able to log the entire network dynamics too... So doing the above over IRC means maybe doubling the byte size to encode keys/sigs into hex, and adding maybe 32B per message for IRC protocol overhead. So: 560B/channel/10 days 298B/node/12h 384B/channel/1h Assume ~10 channels per node and converting to bytes/node/day: 560B/node/day 564B/node/day 92,160B/node/day = 93,284B/node/day total which is about 1.054 KiB/s per thousand nodes. If it's a single server relaying that to a thousand nodes, that's 8.2 megabit/s outgoing already. So that plan probably maxes out somewhere between 500-3000 nodes? >From what I gather bitcoin only used IRC to get IP addresses to connect to, which were encoded in the nicks used, rather than anything being actually said. It seems like that got up to 10000 nodes [0]. Hopefully lightning's irc usage doesn't get misdetected as botnet C&C :) [0] https://bitcointalk.org/index.php?topic=9240.0 Cheers, aj