From rusty at rustcorp.com.au Tue May 17 07:06:37 2016 From: rusty at rustcorp.com.au (Rusty Russell) Date: Tue, 17 May 2016 16:36:37 +0930 Subject: [Lightning-dev] BOLT #2: wire protocol: YA acknowledgement change. Message-ID: <87k2itnoxu.fsf@rustcorp.com.au> "This time for sure!" OK, there's another revision to the 02-wire-protocol.md draft; this time I implemented a protocol simulator to make sure it's reasonable. As a bonus, it spits out timing diagrams! The summary is that we don't need acknowledgement numbers; the revocation reply gives us everything we need. The draft expresses it in terms of local & remote commitment transactions, and acked and non-acked changesets for both. Basically, the revocation reply is the moment at which you add incoming changes ("unacked") to the other side (as "acked"). It seems to work pretty well in all the corner cases, and it's wire-optimal AFAICT. I've aimed for a layman's writeup here: https://medium.com/@rusty_lightning/lightning-inter-node-protocol-a-primer-c642816c8b8#.8skw6hfar The spec is here: https://github.com/rustyrussell/lightning-rfc/blob/master/bolts/02-wire-protocol.md And tests are here: https://github.com/ElementsProject/lightning/blob/test-protocol/test/test_protocol.c https://github.com/ElementsProject/lightning/tree/test-protocol/test/commits Feedback certainly welcome! Rusty.