Skip to content

Add accountability#846

Open
thomash-acinq wants to merge 2 commits intomasterfrom
accountability
Open

Add accountability#846
thomash-acinq wants to merge 2 commits intomasterfrom
accountability

Conversation

@thomash-acinq
Copy link
Copy Markdown
Contributor

@thomash-acinq thomash-acinq commented Jan 5, 2026

Add support for accountability to fight channel jamming:

  • We create accountable invoices (Bolt11 and Bolt12)
  • We set upgrade_accountability in HTLCs when paying accountable invoices

Because we do not relay HTLCs, we don't need to set or read accountable in HTLCs. So this is not implemented.

Eclair: ACINQ/eclair#3217
Spec: lightning/bolts#1280

Add support for accountability to fight channel jamming:
- We create accountable invoices (Bolt11 and Bolt12)
- We set `upgrade_accountability` in HTLCs when paying accountable invoices

Because we do not relay HTLCs, we don't need to set or read `accountable` in HTLCs. So this is not implemented.
Copy link
Copy Markdown
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 good, can you add unit tests for encoding/decoding each TLV added, which we can compare to eclair to catch potential encoding issues before releasing?

Comment thread modules/core/src/commonMain/kotlin/fr/acinq/lightning/payment/Bolt11Invoice.kt Outdated
thomash-acinq added a commit to ACINQ/eclair that referenced this pull request Jan 8, 2026
These tests are also added to lightning-kmp (ACINQ/lightning-kmp#846) to check compatibility.
@thomash-acinq
Copy link
Copy Markdown
Contributor Author

Added some tests, also to eclair (ACINQ/eclair#3240)

Copy link
Copy Markdown
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.

ACK 740d49b, but we shouldn't merge this right now. Let's wait for the spec to be officially added to the BOLTs before making a user-visible change, it's too risky otherwise.

thomash-acinq added a commit to ACINQ/eclair that referenced this pull request Jan 8, 2026
These tests are also added to lightning-kmp (ACINQ/lightning-kmp#846) to check compatibility.
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.

2 participants