[Lightning-dev] Concurrent sigs in BOLT #2

Pierre pm+lists at acinq.fr
Sun Apr 24 19:29:22 UTC 2016


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


More information about the Lightning-dev mailing list