Skip to content

LND rejects a valid commitment #1908

@pm47

Description

@pm47

Background

eclair-lnd channel, an htlc has been failed right after a disconnection, and reconnection lnd rejects a sig which seems valid.

Note the lnd node definitely seems to be having issues (see huge delays between sig and rev below), but that doesn't explain the disagreement over the commitment

Your environment

  • version of lnd: bitrefill node 024a2e265cd66066b78a788ae615acdc84b5b0dec9efac36d7ac87513015eaf6ed

Steps to reproduce

A                B
  |<-----add-------| htlc for 9 satoshi
  |<-----sig-------|
  |------rev------>|
  |------sig------>|
  |                | an hour elapses (?)
  |<-----rev-------|
  |------fail----->| we fail immediately
  |------sig------>|
  |                | 10 minutes
  |------fee------>|
  |                | 10 minutes
  |------fee------>|
  |                |
  |     (...)      | 9 update fee in total, one every 10 minutes
  |                |
  |------fee------>|
  |                |
  |<------rev------| eventually we get the revocation two hours later
  |-------sig----->| we sign the fee update
  |<------sig------| we receive a sig with the htlc removed
  |-------rev----->|
  |                |
  |        X       | connection reset
  |                |
  |--reestablish-->|
  |<-reestablish---|
  |-----fee x9---->| we resend all the fees
  |------sig------>| and the sig
  |------rev------>| and the rev
  |<-----err-------| error: rejected commitment

Expected behaviour

lnd accepts the sig.

Actual behaviour

lnd rejects the signature, and provides the tx it expected, which does include the htlc that was previously removed (and which removal was acked by lnd). OTOH this tx has the correct feerate.

This looks like everything from the fail until the disconnection was lost on lnd's side, but shouldn't the state have been persisted to disk?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1MUST be fixed or reviewedbugUnintended code behaviourcommitmentsCommitment transactions containing the state of the channelinteropinterop with other implementations

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions