From pm+lists at acinq.fr Sun Apr 24 19:29:22 2016 From: pm+lists at acinq.fr (Pierre) Date: Sun, 24 Apr 2016 21:29:22 +0200 Subject: [Lightning-dev] Concurrent sigs in BOLT #2 Message-ID: Hello, I am trying to understand how we should handle concurrent signatures, and I am wondering if we couldn't use an ordering of some sort to resolve conflicts when they occur, for example by simply comparing signatures. If two nodes send each other a signature at the same time, they could agree that the one that sent the "greatest" signature has to immediately resend a new signature including all pending changes. This new signature would encompass all the changes both parties wanted in the first place so everybody would be happy. For example if "SIG B0 > SIG A0": NODE A NODE B Committed: [] Committed: [] Staged: [X] Staged: [Y] ADD HTLC X ---- ---- ADD HTLC Y \ / \ / Committed: [X] \ / Committed: [Y] Staged: [] \/ Staged: [] SIG A0 --- /\ --- SIG B0 \ / \ / \/ \/ /\ /\ <--- \ / ---> Committed: [X] \/ Committed: [Y] Staged: [Y] /\ Staged: [X] / \ / \ DISCARD SIG A0 <---- -----> DISCARD SIG B0 Committed: [] Committed: [] Staged: [X Y] Staged: [X Y] Committed: [X Y] Staged: [] <---------------- SIG B1 Committed: [X Y] Staged: [] REVOCATION ----------------> SIG A1 ----------------> <---------------- REVOCATION Cheers, Pierre