Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTLCs rexmit out of order #4124

Commits on Oct 14, 2020

  1. channeld: log broken message if we receive HTLCs out of order.

    We didn't care, but other implementations (particularly lnd) do.  And it
    does violate the spec.
    
    (We need to use skip not xfail on the test which catches this, since
    xfail doesn't seem to stop errors reported by cleanup)
    
    (Includes Christian's typo fix!)
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    306edea View commit details
    Browse the repository at this point in the history
  2. pytest: add test for HTLC ordering.

    [ Includes tidyups by Christian Decker ]
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    10a36cf View commit details
    Browse the repository at this point in the history
  3. channeld: order htlcs by id before retransmission.

    We had one report of this, and then Eugene and Roasbeef of Lightning
    Labs confirmed it; they saw misordered HTLCs on reconnection too.
    
    Since we didn't enforce this when we receive HTLCs, we never noticed :(
    
    Fixes: ElementsProject#3920
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Fixed: Protocol: fixed retransmission order of multiple new HTLCs (causing channel close with LND)
    rustyrussell committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    7f4b11e View commit details
    Browse the repository at this point in the history