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

xpay blinded path fix #8121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

Fixes: #8119

The old blindedpay fields would have an entry per hop, but that was changed
to a single per-path entry.  The devtools hadn't caught up.

Similarly, it didn't like descriptionless offer fields in invreqs and invoices.

Signed-off-by: Rusty Russell <[email protected]>
Use larger CLTVs and we see the failure from l3, complaining the CLTV is outside
the amount in the payment_constraint field, like:

```
Failing HTLC because of an invalid payload (TLV 10 pos 104): cltv_expiry 609 > payment_constraint 376
```

Signed-off-by: Rusty Russell <[email protected]>
We added twice, which caused spurious failures in real-world cases.

Signed-off-by: Rusty Russell <[email protected]>
Reported-by: https://github.com/hMsats
Fixes: ElementsProject#8119
Changelog-Fixed: `xpay` would double the CLTV values in blinded paths, sometimes causing spurious failures.
@rustyrussell rustyrussell added this to the v25.02 milestone Feb 26, 2025
@rustyrussell rustyrussell force-pushed the guilt/xpay-blinded-path-fix branch from fadd3f1 to 54cb309 Compare February 26, 2025 07:00
Comment on lines +809 to +810
# CLTV is blockheight (108) + 1 + 100 + 200 + 400
l1.daemon.wait_for_log(f'Adding outgoing HTLC 0 amount=15002msat cltv={108 + 1 + 100 + 200 + 400}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange this does not too?

        # This works.
        l1.rpc.pay(inv)
        # CLTV is blockheight (108) + 1 + 100 + 200 + 400
>       l1.daemon.wait_for_log(f'Adding outgoing HTLC 0 amount=15002msat cltv={108 + 1 + 100 + 200 + 400}')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to pay an invoice returned by an offer
2 participants