-
Notifications
You must be signed in to change notification settings - Fork 912
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
Blinded paths cross-compatibility issues #5823
Comments
See: ElementsProject#5823 Reported-by: @t-bast Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (update_add_tlvs fix, Eclair compat)
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
Our pay code handles this correctly, but decode was still using an old model where there was a payinfo per hop, not per path. Reported-by: @t-bast See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See: ElementsProject#5823 Reported-by: @t-bast Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (update_add_tlvs fix, Eclair compat)
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
Our pay code handles this correctly, but decode was still using an old model where there was a payinfo per hop, not per path. Reported-by: @t-bast See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: #5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
See: ElementsProject#5823 Reported-by: @t-bast Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (update_add_tlvs fix, Eclair compat)
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
Our pay code handles this correctly, but decode was still using an old model where there was a payinfo per hop, not per path. Reported-by: @t-bast See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See: ElementsProject#5823 Reported-by: @t-bast Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (update_add_tlvs fix, Eclair compat)
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
Our pay code handles this correctly, but decode was still using an old model where there was a payinfo per hop, not per path. Reported-by: @t-bast See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See: ElementsProject#5823 Reported-by: @t-bast Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (update_add_tlvs fix, Eclair compat)
``` make check-source-bolt CHECK_BOLT_PREFIX="--prefix=BOLT-route-blinding" BOLTVERSION=guilt/offers ``` Other than textual changes, this does: 1. Ensures we put total_amount_msat in onion final hop (reported by @t-bast). 2. Require that they put total_amount_msat in onion final hop. 3. Return `invalid_onion_blinding` exactly as defined by the spec (i.e. less aggressive when we're the final hop) (also reported by @t-bast, but I already knew). See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `offers` breaking blinded payments change (total_amount_sat required, Eclair compat)
Our pay code handles this correctly, but decode was still using an old model where there was a payinfo per hop, not per path. Reported-by: @t-bast See: ElementsProject#5823 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
I think I'm seeing this on two directly connected cln (23.05.2) peers. I hoped the "self pay" support in master might fix this, but I'm now getting a crash instead of an error ( |
I've been testing blinded payments between
cln
v22.11 andeclair
and I have exciting news: there are a few minor issues and incompatibilities, but once I worked around them, everything was working very smoothly!You can find more details about what tests I ran at the end of this issue, but I'll start with the list of things that should be fixed.
Bolt 12 feature bits
Currently
cln
doesn't set any feature bit in Bolt 12 invoices.This means that we don't know whether we can use MPP or not (so I had to force MPP usage in
eclair
).On the contrary,
eclair
sets a few feature bits in its Bolt 12 invoices:var_onion_optin:mandatory
,option_route_blinding:mandatory
,basic_mpp:optional
(removed if MPP was deactivated).The Bolt 12 invoices
eclair
generates by default were rejected bycln
because of these feature bits.We need to settle on what feature bits can be used here and clarify the Bolt 12 spec.
EDIT: the offers spec PR says that the MPP feature bit is the only feature bit allowed in Bolt 12 objects: eclair will be updated to match that in ACINQ/eclair#2386
update_add_htlc
's blinding pointThe route blinding PR specifies that tlv field number
0
must be used when sending theblinding_point
inupdate_add_htlc
(inside a blinded route).It looks like
cln
is currently using tlv field2
instead when relaying payments, that should be fixed?total_amount_msat
field in onion payloadThe route blinding PR made the
total_amount_msat
field (tlv number18
) mandatory when sending to a blinded route, butcln
currently doesn't set it.Missing support for sending to a blinded route when the node is also its introduction point
We discussed that a while ago, this is a somewhat tricky edge case.
Eclair already supports this, but it looks like
cln
doesn't, it replies to thepay
command with the following error:Obsolete interpretation of
blinded_payinfo
In the latest iterations, we decided to include one
blinded_payinfo
per blinded path, that represents the aggregated payment information for the whole path.It looks like
cln
still expects oneblinded_payinfo
per hop of every blinded path, since it returns the following warning when decoding invoices:Detailed tests report
This section details the e2e tests I ran on
regtest
if someone wants to replay them or test other scenarios.Note that it would be nice to have a way to generate "real" blinded paths from
cln
(not only dummy hops) to do more testing.For all the following tests, Alice and Bob are running
eclair
and Carol and Dave are runningcln
.Dave creates Bolt12 invoice with just dummy hops, Bob pays it
We setup channels with the following balances:
Test steps:
Dave creates Bolt12 invoice with just dummy hops, Alice pays it using MPP
We setup channels with the following balances:
Test steps:
Alice creates Bolt12 invoice with just dummy hops, Dave pays it
We setup channels with the following balances:
Test steps:
Alice creates Bolt12 invoice with just dummy hops, Carol pays it
We setup channels with the following balances:
Test steps:
Alice creates Bolt12 invoice with blinded hop Bob -> Alice, Bob pays it
We setup channels with the following balances:
Test steps:
Bob -> Alice
and dummy hopsAlice creates Bolt12 invoice with blinded hop Carol -> Alice, Carol pays it
We setup channels with the following balances:
Test steps:
Carol -> Alice
and dummy hopscln
and no payment is sentAlice creates Bolt12 invoice with blinded hop Bob -> Alice, Dave pays it
We setup channels with the following balances:
Test steps:
Bob -> Alice
and dummy hopsAlice creates Bolt12 invoice with blinded hops Bob -> Alice and Carol -> Alice, Dave pays it using MPP
We setup channels with the following balances:
Test steps:
Bob -> Alice
and dummy hopsCarol -> Alice
and dummy hopsblinding_point
Dave creates Bolt12 invoice but not enough incoming liquidity, Alice tries to pay it
We setup channels with the following balances:
Test steps:
invalid_onion_blinding
instead ofmpp_timeout
-> that should probably change, Dave isn't hiding itsnode_id
and could return a normal failure?Alice creates Bolt12 invoice but not enough incoming liquidity, Dave tries to pay it
We setup channels with the following balances:
Test steps:
Bob -> Alice
and dummy hopsCarol -> Alice
and dummy hopsinvalid_onion_blinding
failuresThe text was updated successfully, but these errors were encountered: