Add BOLT11DecodeException and InvalidBitcoinURI wraps for missing uncaught exceptions. - #10940
Merged
Merged
Conversation
accumulator
force-pushed
the
fix_10937
branch
6 times, most recently
from
September 7, 2026 14:50
3883bdb to
4f072e0
Compare
accumulator
marked this pull request as ready for review
September 7, 2026 15:12
accumulator
force-pushed
the
fix_10937
branch
from
September 7, 2026 15:15
4f072e0 to
0ae3ef7
Compare
f321x
reviewed
Sep 8, 2026
f321x
reviewed
Sep 8, 2026
f321x
reviewed
Sep 8, 2026
f321x
reviewed
Sep 8, 2026
accumulator
marked this pull request as draft
September 11, 2026 08:22
accumulator
force-pushed
the
fix_10937
branch
5 times, most recently
from
September 11, 2026 11:38
c41543d to
cf03b44
Compare
…as BOLT11DecodeException also make fallback address parsing more strict. This implements tightened rules as described in lightning/bolts#1243 - MUST include exactly one p field - MUST include exactly one s field - MUST include either exactly one d or exactly one h field
route data/amount constructor arguments through setters, so we don't skip validation
We implement exactly the DB upgrade the comment there describes, so the old tests can be removed.
replaces invoices in tests with invoices with payment secret replaces lnpeer transitive feature test from BASIC_MPP_OPT -> PAYMENT_SECRET_OPT to PAYMENT_SECRET_OPT -> VAR_ONION_OPT
accumulator
force-pushed
the
fix_10937
branch
from
September 11, 2026 11:40
cf03b44 to
1f78bb6
Compare
accumulator
marked this pull request as ready for review
September 11, 2026 12:28
f321x
reviewed
Sep 14, 2026
f321x
reviewed
Sep 14, 2026
f321x
reviewed
Sep 14, 2026
f321x
reviewed
Sep 14, 2026
f321x
reviewed
Sep 14, 2026
Address review comments of spesmilo#10940
Member
|
Were you already looking at lightning/bolts#1357 too, or is it a coincidence that you also fixed that here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add
BOLT11DecodeExceptionandInvalidBitcoinURIwraps for missing uncaught exceptions.fixes #10937
Also this implements tightened rules as described in lightning/bolts#1243
Note: this makes bolt11 decoding more strict, therefore a wallet_db migration has been added to remove invoices not passing the strict parse.
Note2: this rabbit-holed a lot more than just fixing 10937, validation brought up to spec with https://github.com/lightning/bolts/blob/master/11-payment-encoding.md#tagged-fields