際際滷

際際滷Share a Scribd company logo
Lightning Network (BOLT)
Normal Operation Sequence
Hiroki Gondo (Nayuta inc.)
2019/05/21
+-----+ +-----+
| |--- update A -->| |
| |<-- update B ---| |
| | | |
| | | |
| | | |
| A | | B |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+
| |--- update A -->| | How many more messages
| |<-- update B ---| | are needed?
| | | |
| | ? | | a. 2 messages
| | ? | | b. 4 messages
| A | ? | B | c. 6 messages
| | ? | | d. more
| | ? | |
| | ? | |
| | ? | |
| | ? | |
+-----+ +-----+
+------------+ +-----+ +-----+ +------------+
|commit tx #0| | |--- update A -->| | |commit tx #0|
+------------+ | |<-- update B ---| | +------------+
|sig | | | | | |sig |
+------------+ | | | | +------------+
| | | |
| A | | B |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
Lightning Network (BOLT) Normal Operation Sequence
+-----+ +-----+ +-------------+
| | | | |commit tx #0 |
| | | | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| A | | B |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| | | | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| A | | B |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| | | | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| |(update B) +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| |(update B) +-------------+
| | | | |sig |
| |---- commit --->| | +-------------+
| | | |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| |(update B) +-------------+
| | | | |sig |
| |---- commit --->| | +-------------+
| | | |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |sig |
+-----+ +-----+ +-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| |(update B) +-------------+
| | | | |sig |
| |---- commit --->| | +-------------+
| |<--- revoke ----| |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |sig |
+-----+ +-----+ +-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #0 |
| |<-- update B ---| |(update B) +-------------+
| | | | |sig |
| |---- commit --->| | +-------------+
| |<--- revoke ----| |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |sig |
+-----+ +-----+ +-------------+
+-----+ +-----+
| |--- update A -->| |
| |<-- update B ---| |(update B)
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
| A | | B | +-------------+
| | | | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |sig |
+-----+ +-----+ +-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| |(update B) +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| |(update B) +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| |(update B) +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| | | | +-------------+
| | | | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| | | | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| | | | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
|sig |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| | | | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
|sig |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
|sig |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |sig |
| A | | B | +-------------+
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
|sig |
+-------------+
+-----+ +-----+
| |--- update A -->| |
| |<-- update B ---| |
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
| A | | B |
| |<--- commit ----| |
| |---- revoke --->| | +-------------+
| | | | |commit tx #2 |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update A |
+-----+ +-----+ +-------------+
|update B |
+-------------+
|sig |
+-------------+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+ Ans. 6 messages
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+ Ans. 6 messages ???
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- commit ----| | |update B |
| A |<--- revoke ----| B | +-------------+
| |---- revoke --->| | |sig |
| |---- commit --->| | +-------------+
| |<--- revoke ----| |
| |<--- commit ----| |
| |---- revoke --->| |
+-----+ +-----+ Ans. 6 or 8 messages
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- commit ----| | |update B |
| A |<--- revoke ----| B | +-------------+
| |---- revoke --->| | |sig |
| |---- commit --->| | +-------------+
| |<--- revoke ----| |
| |<--- commit ----| |
| |---- revoke --->| |
+-----+ +-----+ Ans. 6 or 8 messages
Lightning Network (BOLT) Normal Operation Sequence
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+ Why?
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+ Why?
Lightning Network (BOLT) Normal Operation Sequence
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| | | | +-------------+
| | | | |update A |
| | | | +-------------+
| | | |
| A | | B |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |update B !!! |
| A | | B | +-------------+
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |update B |
| A |---- commit --->| B | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| | | | +-------------+
| | | | |update B |
| A |---- commit --->| B | +-------------+
| | | | |sig |
| | | | +-------------+
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| | update B -| | +-------------+
| | / | | |update A |
| | / | | +-------------+
| | / | | |update B |
| A |---- commit --->| B | +-------------+
| | / | | |sig |
| | / | | +-------------+
| |<-------- | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| | update B -| | +-------------+
| | / | | |update A |
| | / | | +-------------+
| | / | | |update B |
| A |---- commit --->| B | +-------------+
| | / | | |sig (invalid)|
| | / | | +-------------+
| |<-------- | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #1 |
| | update B -| | +-------------+
| | / | | |update A |
| | / | | +-------------+
| |<------------ | | |update B |
| A |---- commit --->| B | +-------------+
| | | | |sig (valid) |
| | | | +-------------+
| | | |
| | | |
| | | |
+-----+ +-----+
+-----+ +-----+ +-------------+
| |--- update A -->| | |commit tx #2 |
| |<-- update B ---| | +-------------+
| | | | |update A |
| |---- commit --->| | +-------------+
| |<--- revoke ----| | |update B |
| A | | B | +-------------+
| |<--- commit ----| | |sig |
| |---- revoke --->| | +-------------+
| | | |
| |---- commit --->| |
| |<--- revoke ----| |
+-----+ +-----+
BOLT #2: Peer Protocol for Channel Management
Normal Operation
> Counter-intuitively, these updates apply to the other
> node's commitment transaction; the node only adds those
> updates to its own commitment transaction when the remote
> node acknowledges it has applied them via
> `revoke_and_ack`.

More Related Content

Lightning Network (BOLT) Normal Operation Sequence

  • 1. Lightning Network (BOLT) Normal Operation Sequence Hiroki Gondo (Nayuta inc.) 2019/05/21
  • 2. +-----+ +-----+ | |--- update A -->| | | |<-- update B ---| | | | | | | | | | | | | | | A | | B | | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 3. +-----+ +-----+ | |--- update A -->| | How many more messages | |<-- update B ---| | are needed? | | | | | | ? | | a. 2 messages | | ? | | b. 4 messages | A | ? | B | c. 6 messages | | ? | | d. more | | ? | | | | ? | | | | ? | | | | ? | | +-----+ +-----+
  • 4. +------------+ +-----+ +-----+ +------------+ |commit tx #0| | |--- update A -->| | |commit tx #0| +------------+ | |<-- update B ---| | +------------+ |sig | | | | | |sig | +------------+ | | | | +------------+ | | | | | A | | B | | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 6. +-----+ +-----+ +-------------+ | | | | |commit tx #0 | | | | | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | A | | B | | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 7. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | | | | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | A | | B | | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 8. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | | | | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | +-----+ +-----+
  • 9. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | +-----+ +-----+
  • 10. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| |(update B) +-------------+ | | | | |sig | | | | | +-------------+ | | | | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | +-----+ +-----+
  • 11. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| |(update B) +-------------+ | | | | |sig | | |---- commit --->| | +-------------+ | | | | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | +-----+ +-----+
  • 12. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| |(update B) +-------------+ | | | | |sig | | |---- commit --->| | +-------------+ | | | | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |sig | +-----+ +-----+ +-------------+
  • 13. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| |(update B) +-------------+ | | | | |sig | | |---- commit --->| | +-------------+ | |<--- revoke ----| | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |sig | +-----+ +-----+ +-------------+
  • 14. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #0 | | |<-- update B ---| |(update B) +-------------+ | | | | |sig | | |---- commit --->| | +-------------+ | |<--- revoke ----| | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |sig | +-----+ +-----+ +-------------+
  • 15. +-----+ +-----+ | |--- update A -->| | | |<-- update B ---| |(update B) | | | | | |---- commit --->| | | |<--- revoke ----| | | A | | B | +-------------+ | | | | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |sig | +-----+ +-----+ +-------------+
  • 16. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| |(update B) +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 17. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| |(update B) +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 18. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| |(update B) +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | | | | | | | | | | | | | +-----+ +-----+
  • 19. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | | | | +-------------+ | | | | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+
  • 20. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | | | | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+
  • 21. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | | | | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+ |sig | +-------------+
  • 22. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | | | | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+ |sig | +-------------+
  • 23. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+ |sig | +-------------+
  • 24. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |sig | | A | | B | +-------------+ | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+ |sig | +-------------+
  • 25. +-----+ +-----+ | |--- update A -->| | | |<-- update B ---| | | | | | | |---- commit --->| | | |<--- revoke ----| | | A | | B | | |<--- commit ----| | | |---- revoke --->| | +-------------+ | | | | |commit tx #2 | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update A | +-----+ +-----+ +-------------+ |update B | +-------------+ |sig | +-------------+
  • 26. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 27. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+ Ans. 6 messages
  • 28. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+ Ans. 6 messages ???
  • 29. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- commit ----| | |update B | | A |<--- revoke ----| B | +-------------+ | |---- revoke --->| | |sig | | |---- commit --->| | +-------------+ | |<--- revoke ----| | | |<--- commit ----| | | |---- revoke --->| | +-----+ +-----+ Ans. 6 or 8 messages
  • 30. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- commit ----| | |update B | | A |<--- revoke ----| B | +-------------+ | |---- revoke --->| | |sig | | |---- commit --->| | +-------------+ | |<--- revoke ----| | | |<--- commit ----| | | |---- revoke --->| | +-----+ +-----+ Ans. 6 or 8 messages
  • 32. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 33. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 34. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 35. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+ Why?
  • 36. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 37. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+ Why?
  • 39. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | | | | +-------------+ | | | | |update A | | | | | +-------------+ | | | | | A | | B | | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 40. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |update B !!! | | A | | B | +-------------+ | | | | | | | | | | | | | | | | | | | | +-----+ +-----+
  • 41. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |update B | | A |---- commit --->| B | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | | | | | | | | +-----+ +-----+
  • 42. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | |<-- update B ---| | +-------------+ | | | | |update A | | | | | +-------------+ | | | | |update B | | A |---- commit --->| B | +-------------+ | | | | |sig | | | | | +-------------+ | | | | | | | | | | | | +-----+ +-----+
  • 43. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | | update B -| | +-------------+ | | / | | |update A | | | / | | +-------------+ | | / | | |update B | | A |---- commit --->| B | +-------------+ | | / | | |sig | | | / | | +-------------+ | |<-------- | | | | | | | | | | +-----+ +-----+
  • 44. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | | update B -| | +-------------+ | | / | | |update A | | | / | | +-------------+ | | / | | |update B | | A |---- commit --->| B | +-------------+ | | / | | |sig (invalid)| | | / | | +-------------+ | |<-------- | | | | | | | | | | +-----+ +-----+
  • 45. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #1 | | | update B -| | +-------------+ | | / | | |update A | | | / | | +-------------+ | |<------------ | | |update B | | A |---- commit --->| B | +-------------+ | | | | |sig (valid) | | | | | +-------------+ | | | | | | | | | | | | +-----+ +-----+
  • 46. +-----+ +-----+ +-------------+ | |--- update A -->| | |commit tx #2 | | |<-- update B ---| | +-------------+ | | | | |update A | | |---- commit --->| | +-------------+ | |<--- revoke ----| | |update B | | A | | B | +-------------+ | |<--- commit ----| | |sig | | |---- revoke --->| | +-------------+ | | | | | |---- commit --->| | | |<--- revoke ----| | +-----+ +-----+
  • 47. BOLT #2: Peer Protocol for Channel Management Normal Operation > Counter-intuitively, these updates apply to the other > node's commitment transaction; the node only adds those > updates to its own commitment transaction when the remote > node acknowledges it has applied them via > `revoke_and_ack`.