Comments (3)
Nice catch! We added FindOutgoingHTLCDeadline
to pass into the HTLC timeout resolver so it could use compute the CLTV delta. We can use the same routine here to compute the deltas to determine what the overall commitment deadline should be.
from lnd.
Thank you for catching this! I forgot to mention I wanna more opinions here re how we decide the deadline in this case. I don't think we can use the CLTV delta directly, as it may cause no blocks left when sweeping the outgoing HTLCs. Essentially, when sweeping the CPFP anchor and outgoing HTLC, the CLTV is the shared deadline. The expected result is, the HTLC is swept within CLTV delta blocks, which means the anchor CPFP must be confirmed at some block within the CLTV delta too.
More aggressive on the CPFP part.
|-CPFP-|-----HTLC-----|
Share the deadlines evenly.
|---CPFP---|---HTLC---|
More aggressive on the HTLC part.
|-----CPFP-----|-HTLC-|
I think as a starting point, we can ask the CPFP anchor and the HTLC to share the deadline evenly, wdyt?
In the long run, I think the deadline used for CPFP anchor sweeping is a function over all the HTLCs' deadlines and values, future stuff tho.
from lnd.
Thank you for catching this! I forgot to mention I wanna more opinions here re how we decide the deadline in this case. I don't think we can use the CLTV delta directly, as it may cause no blocks left when sweeping the outgoing HTLCs.
This is also something we need to consider for incoming HTLCs, which have a much shorter default window (10 blocks) to confirm the commitment and HTLC-preimage transactions.
Splitting the window in half seems best to me, especially for this shorter 10 block window. Splitting unevenly (e.g., 80-20) would result in too short of deadlines for either the commitment or HTLC-preimage.
from lnd.
Related Issues (20)
- [bug]: `lncli getdebuginfo` not showing the current state of config HOT 8
- [bug]: externalhosts does not advertize IPv4+IPv6 domain HOT 2
- [bug]: Potential Deadlock in HodlInvoice logic HOT 11
- [Failing test]: Unexpected number of transactions in mempool in neutrino channel force closure itest
- `LeaseOutput` is slow with postgres backend HOT 1
- [bug]: confirmed funds gone after sweeping all tx HOT 1
- [bug]: routerClient.BuildRoute does not consider inbound fees HOT 5
- [feature]: Add `CanSend` amount to listchannels output HOT 5
- [feature]: sweep: batch inputs with similar deadlines HOT 1
- invoices lacking routing hints, made from zero_conf channels, yield "NO_ROUTE" on payment attempts in first few minutes of the channel's life HOT 4
- [epic]: ChannelDB, Graph, Gossiper and Router separation
- [epic]: Payment and Router separation
- [epic]: revive `ChannelRouter` as the layer 3 within the ln stack
- [bug]: Not able to bumpclosefee of an anchor channel in a special case (no HLTCs at stake). HOT 4
- References to known test flakes and planned fixes
- [bug]: Pending Force Close Channel with negative blocks till maturity. HOT 2
- build: enable coveralls as a required check
- [feature]: Persist imported Mission Control Data across restarts. HOT 4
- [bug]: On restart LND attempts to broadcast different FC tx for already closing channel, shuts down HOT 7
- [bug]: recent security vulnerability not listed on github security page HOT 1
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 lnd.