You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove non-final transactions from XxxCommitPublished (#3097)
When a channel was force-closed, we previously stored partially created
closing transactions for each output of the commitment transaction. In
some cases those transactions didn't include any on-chain fee (HTLC txs
with 0-fee anchors) and weren't signed. The fee is set in the publisher
actors which then sign those transactions.
This was an issue because we used those partial transactions as if they
were the final transaction that would eventually confirm: this made it
look like RBF wasn't an option to callers, and was thus easy to misuse.
We now change our data model to only store the outputs of the commit tx
that we may spend, without any actual spending transaction. We only
store spending transactions once they are confirmed, at which point they
can safely be used as closing transactions by callers such as our
balance checks.
This lets us get rid of some codec migration code related to closing
transactions, and is more future-proof because we now don't need to
encode closing transactions and can thus change their format easily.
This also reduces the size of our channel state during force-close.
We add a `max-closing-feerate` config parameter to cap the feerate used
for closing transactions which aren't at risk of being double-spent.
Node operators should generally use a low value here, and update it when
they need to reclaim liquidity if needed.
Copy file name to clipboardExpand all lines: docs/FAQ.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# FAQ
2
2
3
-
## What does it mean for a channel to be "enabled" or "disabled"?
3
+
## What does it mean for a channel to be "enabled" or "disabled"?
4
4
5
5
A channel is disabled if a `channel_update` message has been broadcast for that channel with the `disable` bit set (see [BOLT 7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message)). It means that the channel still exists but cannot be used to route payments, until it has been re-enabled.
6
6
@@ -13,6 +13,16 @@ There are other cases when a channel becomes disabled, for example when its bala
13
13
14
14
Note that you can have multiple channels between the same nodes, and that some of them can be enabled while others are disabled (i.e. enable/disable is channel-specific, not node-specific).
15
15
16
-
## How should you stop an Eclair node ?
16
+
## How do I make my closing transactions confirm faster?
17
+
18
+
When channels are unilaterally closed, there is a delay before which closing transactions can be published: you must wait for this delay before you can get your funds back.
19
+
20
+
Once published, transactions will be automatically RBF-ed by `eclair` based on your configuration values for the [`eclair.on-chain-fees` section](../eclair-core/src/main/resources/reference.conf).
21
+
22
+
Note that there is an upper bound on the feerate that will be used, configured by the `eclair.on-chain-fees.max-closing-feerate` parameter.
23
+
If the current feerate is higher than this value, your transactions will not confirm.
24
+
You should update `eclair.on-chain-fees.max-closing-feerate` in your `eclair.conf` and restart your node: your transactions will automatically be RBF-ed using the new feerate.
25
+
26
+
## How should you stop an Eclair node?
17
27
18
28
To stop your node you just need to kill its process, there is no API command to do this. The JVM handles the quit signal and notifies the node to perform clean-up. For example, there is a hook to cleanly free DB locks when using Postgres.
We added a new configuration value to `eclair.conf` to limit the feerate used for force-close transactions where funds aren't at risk: `eclair.on-chain-fees.max-closing-feerate`.
45
+
This ensures that you won't end up paying a lot of fees during mempool congestion: your node will wait for the feerate to decrease to get your non-urgent transactions confirmed.
46
+
If you need those transactions to confirm because you are low on liquidity, you should update `eclair.on-chain-fees.max-closing-feerate` and restart your node: `eclair` will automatically RBF all available transactions.
47
+
42
48
#### Remove confirmation scaling based on funding amount
43
49
44
50
We previously scaled the number of confirmations based on the channel funding amount.
// If HTLC transactions are confirmed, they will appear in our on-chain balance if we were the one to claim them.
110
104
// We only need to include incoming HTLCs that haven't been claimed yet (since we assume that they will be fulfilled).
111
105
// Note that it is their commitment, so incoming/outgoing are inverted.
112
-
valadditionalHtlcs= rcp.claimHtlcTxs.map {
113
-
case (outpoint, Some(_: ClaimHtlcSuccessTx)) if!rcp.irrevocablySpent.contains(outpoint) => rcp.commitTx.txOut(outpoint.index.toInt).amount
114
-
case (outpoint, None) if!rcp.irrevocablySpent.contains(outpoint) => rcp.commitTx.txOut(outpoint.index.toInt).amount // incoming HTLC for which we don't have the preimage yet
106
+
valadditionalHtlcs= rcp.incomingHtlcs.keys.map {
107
+
case outpoint if!rcp.irrevocablySpent.contains(outpoint) => rcp.commitTx.txOut(outpoint.index.toInt).amount
0 commit comments