Comments (2)
I agree this is currently a bit unclear, because there is currently no way in the spec to communicate a blinded route to a potential payer: that is introduced by the Bolt 12 PR, which is why I previously said that it was the responsibility of that PR (or any other PR that uses blinded paths) to detail how max_cltv
should be computed. But maybe it's clearer to do it right now, directly in Bolt 4, and let protocols that use blinded paths simply refer to this default construction. If you feel like giving this a shot, I'll gladly review that PR!
But this then violates Alice's initial chosen max_cltv value of 1200.
You are completely correct, and that's a mistake in the example! And when implementing it in eclair, we actually got it right. The mistake is that in the encrypted_data
for herself, Alice takes into account the min_final_cltv_expiry
and sets max_cltv_expiry
to 1212
. Everything else remains the same, which works correctly:
- Alice wants the path to expire at block 1200
- She allocates 12 blocks for the
min_final_cltv_expiry
and 144 blocks for each hop'scltv_expiry_delta
, resulting in afinal_expiry_delta
for the whole path of 300 - The encrypted payload contain:
- Alice: 1212
- Bob: 1356
- Carol: 1500
- Alice communicates to payers that the path's
cltv_expiry_delta
is 300 and that the path expires at block 1200 (which currently isn't explicitly communicated in Bolt 12, but rather uses the invoice expiry as a proxy for the path expiry - which in practice is fine) - Erin uses a final CLTV of 1200:
- Carol receives 1500
- Carol forwards 1356 to Bob
- Bob forwards 1212 to Alice
- And everything should be fine!
This needs to be fixed in proposal doc, probably in the same PR that details how this should be computed!
from bolts.
I also think that perhaps some clarification is needed in BOLT 4 to make the answer to the above more clear as currently it is explicit about how the total_fee_base_msat
and total_fee_proportional_millionths
is calculated but not explicit about the total CLTV (if the CLTV should in fact include the min_final_cltv_delta
as is done in the proposal doc, then we should add that to bolt 4.
One other place I think could use some clarity is around if we still expect the sender to add the extra blocks for the "shadow route" or if we can now just leave that up to the receiver since they now have the ability to easily create shadow hops. This was mentioned in this thread in the offers proposal but I think this suggestion should possibly be added to the current spec as it stands today.
Once there is some clarity here, im happy to open a PR 😊
from bolts.
Related Issues (20)
- Lightning Specification Meeting 2024/02/12 HOT 1
- [feature] Allow the recovering of (outgoing) HTLCs in a DLP case. HOT 3
- Lightning Specification Meeting 2024/02/26 HOT 4
- to_self_delay cannot be updated after opening a channel HOT 3
- Lightning Specification Meeting 2024/03/11 HOT 1
- Lightning Specification Meeting 2024/03/25 HOT 2
- Lightning Specification Meeting 2024/04/08 HOT 3
- Lightning Specification Meeting 2024/04/22 HOT 10
- BOLT-4: Decrypt onion using b_i or k_i HOT 2
- Lightning Specification Meeting 2024/05/06 HOT 4
- Lightning Specification Meeting 2024/05/20 HOT 3
- Add support for bundled payments in BOLT12 HOT 1
- Lightning Specification Meeting 2024/06/03 HOT 2
- BOLT-11: add optional feature bit to indicate delayed settlement of invoice HOT 7
- Lightning Dev Summit Topics HOT 3
- Lightning Specification Meeting 2024/06/17 HOT 1
- Lightning Specification Meeting 2024/07/01 HOT 1
- Lightning Specification Meeting 2024/07/15 HOT 1
- missing bolt11 example where `n` field must be verified by reader
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolts.