Skip to content

Attributable failures #3065

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

Merged
merged 9 commits into from
May 20, 2025
Merged

Attributable failures #3065

merged 9 commits into from
May 20, 2025

Conversation

thomash-acinq
Copy link
Member

@thomash-acinq thomash-acinq commented Apr 17, 2025

Implements lightning/bolts#1044

For cross compatibility, the following scenarios have been successfully tested:

  • LDK generates an attributable failure and eclair decodes it
  • eclair generates an attributable failure, LDK relays it, eclair decodes it
  • LDK generates an attributable failure, eclair relays it, LDK relays it, eclair decodes it

It is disabled by default since the spec may not be final, and will be enabled once the spec PR has been merged to the BOLTs.

@thomash-acinq thomash-acinq force-pushed the attributable-failures branch 3 times, most recently from 336a993 to 1d57546 Compare April 24, 2025 14:54
@thomash-acinq thomash-acinq requested a review from t-bast April 24, 2025 15:03
@thomash-acinq thomash-acinq marked this pull request as ready for review April 24, 2025 15:03
@t-bast
Copy link
Member

t-bast commented Apr 24, 2025

Thanks, will take a look at this next week! Meanwhile, could you take a look at the interactions with trampoline and answer Joost here: lightning/bolts#836 (comment)

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the code yet, but before doing so I'm not seeing important tests:

  • Apart from the tests in SphinxSpec, I don't see any test:
    • are there official spec test vectors? If not, we must create some, and if there are already some, it should be a dedicated unit test to make it obvious
    • can you add unit tests where this is used during payments (maybe in PaymentPacketSpec) to verify the complete encryption/decryption from failure messages?
  • Have you done cross-compatibility tests? We must verify cross-compatibility before merging any of this. The PR description should detail what has been tested, against what implementation, and what works and what doesn't work

@thomash-acinq thomash-acinq force-pushed the attributable-failures branch from 3f6ba7f to 34db493 Compare May 15, 2025 10:54
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me, but I think we're missing tests for the scenarios where one of the intermediate nodes drops the attribution data, or where part of the route does not support attributable failures. That's what makes attributable failures useful, allowing us to detect that at least a subset of the route is honest!

I think some of those tests should be in the official test vectors, can you discuss that with Joost to see how they could be included?

@thomash-acinq
Copy link
Member Author

I've added tests checking that we are able to attribute failures even if the failing node is hiding. I'll suggest to add it to the spec.

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

Can you add release notes since this is a new spec feature?

@thomash-acinq thomash-acinq force-pushed the attributable-failures branch 3 times, most recently from 06cca9a to 992939b Compare May 19, 2025 17:21
@thomash-acinq thomash-acinq force-pushed the attributable-failures branch from 992939b to 1d6a225 Compare May 19, 2025 17:30
@thomash-acinq thomash-acinq merged commit 055695f into master May 20, 2025
1 check passed
@thomash-acinq thomash-acinq deleted the attributable-failures branch May 20, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants