Skip to content

[0.6] unwrap_onion_reply unable to decode remote failure? #857

Description

@ZmnSCPxj

@cdecker @rustyrussell help with #638 please!

I have a "mostly" working version of #638 in a fishing branch: https://github.com/ZmnSCPxj/lightning/commits/fish

On top of #638, branch fish has:

  1. In the test, corrected order in which we wait for the channel to be updated to the payer. The version in pay hands back failures to gossipd #638 starts the wait well after the channel has already been gossiped to the payer.
  2. Dumps path_secrets in send_payment and the path_secrets in payment_failed. Running this shows that the path_secrets created in send_payment are the same as what is processed in payment_failed and passed to unwrap_onion_reply.

First, the test setup. Arrows show the direction of the newly-created channels.

    #   l3-->l4
    #   ^   / |
    #   |  /  |
    #   | L   v
    #   l2<--l1

l1 wants to pay l4. First routing gives the route l1-l4, which fails since l1 has no money in that channel to pay l4 with.

The succeeding case is what is interesting. With l1-l4 channel deactivated due to routing failure, routing will then give the route l1-l2-l4.

When the HTLC reaches l2, it realizes it has no capacity to pay l4, and so generates a WIRE_TEMPORARY_CHANNEL_FAILURE error: https://travis-ci.org/ZmnSCPxj/lightning/jobs/335677831#L7843

l2 then fails the offered HTLC: https://travis-ci.org/ZmnSCPxj/lightning/jobs/335677831#L7852

l1 receives the failure of the HTLC: https://travis-ci.org/ZmnSCPxj/lightning/jobs/335677831#L7856

And then l1 calls into payment_failed but fails to decrypt the onion reply: https://travis-ci.org/ZmnSCPxj/lightning/jobs/335677831#L7973

And now I am stuck!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions