Skip to content

Commit 4af1cb4

Browse files
authored
Merge pull request #24 from dunxen/add-2618
Add 2618
2 parents a7704a0 + 9a87277 commit 4af1cb4

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

_posts/2023-09-15-#1924.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pr: 1924
66
authors: [benthecarman]
77
components: ["ChannelManager", "Channel"]
88
host: dunxen
9-
status: upcoming
9+
status: past
1010
commit:
1111
---
1212

@@ -20,7 +20,7 @@ commit:
2020
## Questions
2121

2222
1. Did you have a quick glance or review of the PR?
23-
1. How do we practically enforce the delay of 100 blocks before sending a `channel_open` for channels with coinbase funding transaction in the PR?
23+
1. How do we practically enforce the delay of 100 blocks before sending a `channel_ready` for channels with coinbase funding transaction in the PR?
2424
1. Why do we not need to worry about adding any buffer on top of the 100 block maturation delay? Think in terms of re-orgs.
2525
1. In the Lightning protocol, it's important that the funding transactions (and all others) are non-malleable (their txids are not malleable).
2626
Usually we think of transactions solely spending segwit-style UTXOs as being non-malleable. In what sense are coinbase transactions non-malleable?

_posts/2023-09-29-#2618.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: pr
3+
date: 2023-09-29
4+
title: "Include an `outbound_payment` flag in `MaybeTimeoutClaimableHTLC`"
5+
pr: 2618
6+
authors: [TheBlueMatt]
7+
components: ["ChannelMonitor"]
8+
host: dunxen
9+
status: upcoming
10+
commit:
11+
---
12+
13+
## Notes
14+
15+
* In [PR 2476] the [`AvailableBalances::balance_msat`] field, which caused confusion due to its strange computation, was removed in favour of
16+
using `ChannelMonitor::get_claimable_balances` which is more straightforward for most use-cases and indicates balances claimable by the holder
17+
after taking on-chain fees into account.
18+
* In [PR 2333] the [`Balance::claimable_amount_satoshis`] method was added, which excluded balances that we are unsure can be claimed (i.e. returns `0` for those balances).
19+
This makes sense on the surface, however, in the case of forwarding an HTLC, we know that we would either be able to claim the timeout balance from
20+
downstream or the preimage balance from upstream. Neither of these would be included in this calculation while the forwarded payment was still pending
21+
and not timed out.
22+
* [PR 2618] (this PR) will include the timeout balance (`MaybeTimeoutClaimableHTLC`) but only in the case of forwarded payments. This offers a more accurate
23+
view of the claimable balance.
24+
25+
26+
## Questions
27+
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK](https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review)?
28+
1. How was the value of the (now removed) `AvailableBalances::balance_msat` field calculated and what was its intended usage?
29+
1. What do we use instead of `balance_msat` for the above purpose?
30+
1. Without the use of `balance_msat` how might a developer using LDK calculate an appropriate balance to show to an end-user?
31+
1. What should the `HTLCSource` of an outbound payment be? And for a forwarded payment?
32+
1. What other fluctuations in balance do we still have after this PR for forwarded payments? How might we resolve these in a future PR?
33+
34+
[PR 2476]: https://github.com/lightningdevkit/rust-lightning/pull/2476
35+
[PR 2333]: https://github.com/lightningdevkit/rust-lightning/pull/2333
36+
[PR 2618]: https://github.com/lightningdevkit/rust-lightning/pull/2618
37+
[`AvailableBalances::balance_msat`]: https://github.com/lightningdevkit/rust-lightning/blob/7a63ab77da7e0be35b1c5d87643e5461cd593b94/lightning/src/ln/channel.rs#L69
38+
[`Balance::claimable_amount_satoshis`]: https://github.com/lightningdevkit/rust-lightning/blob/6016101ac8ff31275f31f68eef8d33e94b19c0b1/lightning/src/chain/channelmonitor.rs#L658

0 commit comments

Comments
 (0)