sweep: bounded batching of CPFP children of pre-signed second-level HTLC txs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
Research direction
The issue names no files or tests, so start from the anchor-child registration referenced in #11094 and the package submission side in #11124. Read how children are registered with NoInputBatch and how a failed child is handled today. The issue asks for tests showing that a healthy anchor is reoffered when a sibling's parent goes missing, and that wallet inputs are recovered on rebuild. Settling the batching design first is needed before any code change.
Written by the indexing model from the issue text.
Description
Each anchor child of a pre-signed second-level HTLC tx (#11094) is registered with NoInputBatch, so every child ties up its own confirmed wallet UTXO while it sits unconfirmed. A peer that triggers many HTLC resolutions at once can exhaust the confirmed inputs that other urgent sweeps need, even with plenty of BTC in unconfirmed change.
The per-child tx exists for failure isolation: a parent that gets evicted or replaced must only fail its own child, never the sweeps batched with it.
A bounded batch of CPFP-only inputs would keep that property while using fewer wallet inputs:
- ordinary sweep inputs stay outside these batches
- when one parent disappears, the child is rebuilt without that anchor instead of failing the batch
- the wallet inputs of the failed child are released for the rebuild
Needs tests that a healthy anchor in such a batch is reoffered when a sibling's parent goes missing, and that the wallet inputs are recovered when the child is rebuilt.
Raised by @yyforyongyu in the review of #11094. Refs #11124 for the package submission side.
- Dominant language
- Go
- Stars
- 8.2k
- Forks
- 2.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 103
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lightningnetwork/lnd
-
funding: failure logs print `<nil>` error and zero channel IDPossibly taken @litbot-9000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
lightningnetwork/lnd#11676 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 85/100
lightningnetwork/lnd#11674 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lightningnetwork/lnd#11672 ·
Maintainers usually reply within 1 day
-
test flake
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
lightningnetwork/lnd#11663 · 1 comment ·
Maintainers usually reply within 1 day
-
[flake]: lnwallet/test/bitcoind.TestLightningWalletBitcoindRPCPolling/spend_unconfirmed_outputsOpentest flake
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lightningnetwork/lnd#11642 · 1 comment ·
Maintainers usually reply within 1 day
All issues in lightningnetwork/lnd
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
containers/gvisor-tap-vsock#796 ·
Maintainers usually reply within 2 days
-
external needs:triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
celestiaorg/celestia-node#5448 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsPossibly taken @huanghaoyuanhhy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zilliztech/milvus-backup#1418 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
projectdiscovery/nuclei#8423 ·
Maintainers usually reply within 1 day