Skip to content

Fix xpay age flakyness#9214

Merged
madelinevibes merged 2 commits into
ElementsProject:masterfrom
Lagrang3:fix-xpay-age-flakyness
Jun 17, 2026
Merged

Fix xpay age flakyness#9214
madelinevibes merged 2 commits into
ElementsProject:masterfrom
Lagrang3:fix-xpay-age-flakyness

Conversation

@Lagrang3

Copy link
Copy Markdown
Collaborator

We use to call askrene-age on xpay layer every 60 seconds to remove old
entries. But for payments to discard old entries it is enough to call
askrene-age before getroutes. True as long as:

    age(t1) * age(t2) * ... * age(tN) = age(tN)

Fixes #9210.

@Lagrang3 Lagrang3 force-pushed the fix-xpay-age-flakyness branch from ebc5dc2 to 6c4cb66 Compare June 15, 2026 06:54
@madelinevibes madelinevibes added this to the v26.09 milestone Jun 16, 2026
@ddustin

ddustin commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Not super familiar with xpay but this looks fine to me and clears CI 👍

ACK 6c4cb66

@madelinevibes madelinevibes force-pushed the fix-xpay-age-flakyness branch from 6c4cb66 to 1c577de Compare June 17, 2026 06:04
@madelinevibes madelinevibes enabled auto-merge (rebase) June 17, 2026 06:05
@madelinevibes madelinevibes disabled auto-merge June 17, 2026 08:59
Lagrang3 added 2 commits June 17, 2026 12:34
preapproveinvoice_succeed and preapprovekeysend_succeed
do the same thing: acknowledge that preapproval rpc call have succeeded
and continue the payment execution via populate_private_layers.
Therefore we use a unique function for both cases: preapprove_succeed.

Changelog-None.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
We use to call askrene-age on xpay layer every 60 seconds to remove old
entries. But for payments to discard old entries it is enough to call
askrene-age before getroutes. True as long as:

age(t1) * age(t2) * ... * age(tN) = age(tN)

Reduces flakyness caused by xpay failing to call askrene-age during lightningd shutdown.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@daywalker90 daywalker90 force-pushed the fix-xpay-age-flakyness branch from 1c577de to d1b7a99 Compare June 17, 2026 10:34
@madelinevibes madelinevibes merged commit 9e8f4ff into ElementsProject:master Jun 17, 2026
86 of 89 checks passed
@Lagrang3 Lagrang3 deleted the fix-xpay-age-flakyness branch June 17, 2026 13:07
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.

pytests: xpay calling askrene-age causes BROKEN line during teardown

3 participants