[Lightning-dev] BOLT #2: wire protocol: YA acknowledgement change.

Rusty Russell rusty at rustcorp.com.au
Tue May 17 07:06:37 UTC 2016


"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.


More information about the Lightning-dev mailing list