Skip to content

Check peer features before attempting wake-up#2979

Merged
t-bast merged 2 commits intomasterfrom
check-peer-features-before-wake-up
Feb 12, 2025
Merged

Check peer features before attempting wake-up#2979
t-bast merged 2 commits intomasterfrom
check-peer-features-before-wake-up

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Jan 10, 2025

Before relaying a trampoline payment, we check if the next node is one of our direct peers. If that's the case, we check their features to see if they support waking up through notifications, in which case we go through the wake-up flow.

Note that we don't need this for channel relay, because:

  • if it is a Bolt 12 payment, the recipient will use a wallet_node_id to let us know that they support wake-up notifications
  • if it is a Bolt 11 payment, we use a custom short_channel_id for phoenix that also lets us know that they support wake-up notifications

@t-bast t-bast requested review from pm47 and thomash-acinq January 10, 2025 15:00
@thomash-acinq
Copy link
Contributor

Looks good, waiting for the rebase on #2978

@t-bast t-bast force-pushed the check-peer-features-before-wake-up branch from 9e98aa7 to 25d4cb6 Compare January 30, 2025 15:24
Before relaying a trampoline payment, we check if the next node is one
of our direct peers. If that's the case, we check their features to see
if they support waking up through notifications, in which case we go
through the wake-up flow.

Note that we don't need this for channel relay, because:

- if it is a Bolt 12 payment, the recipient will use a `wallet_node_id`
  to let us know that they support wake-up notifications
- if it is a Bolt 11 payment, we use a custom `short_channel_id` for
  phoenix that also lets us know that they support wake-up notifications
@t-bast t-bast force-pushed the check-peer-features-before-wake-up branch from 25d4cb6 to c193622 Compare February 12, 2025 13:43
@t-bast
Copy link
Member Author

t-bast commented Feb 12, 2025

Rebased now that #2978 has been merged!

@t-bast t-bast requested a review from pm47 February 12, 2025 14:45
@t-bast t-bast merged commit 372222d into master Feb 12, 2025
1 check passed
@t-bast t-bast deleted the check-peer-features-before-wake-up branch February 12, 2025 15:31
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.

3 participants