📅 Original date posted:2016-05-17
📝 Original message:
"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.