ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.24k stars 266 forks source link

local/remote feerates are too different - does not behave as expected. #2850

Closed fishcakeday closed 4 months ago

fishcakeday commented 6 months ago

One of the channels on my Eclair 0.10.0 node was force closed by my node, with "local/remote feerates are too different":

2024-04-20 00:41:26,000 ERROR f.a.e.c.fsm.Channel PAY n:... c:... - local/remote feerates are too different
: remoteFeeratePerKw=22813 localFeeratePerKw=71026 while processing msg=UpdateAddHtlc in state=NORMAL
2024-04-20 00:41:26,002 ERROR f.a.e.c.fsm.Channel PAY n:... c:... - force-closing with fundingIndex=0
2024-04-20 00:41:26,016 INFO  f.a.e.c.fsm.Channel PAY n:... c:... - tx generation success: desc=local-main-delayed txid=... amount=1165061 sat tx=...
2024-04-20 00:41:26,027 INFO  f.a.e.c.fsm.Channel PAY n:... c:... - tx generation skipped: desc=local-anchor reason: output not found (probably trimmed)
2024-04-20 00:41:26,028 INFO  f.a.e.c.fsm.Channel PAY n:... c:... - tx generation skipped: desc=remote-anchor reason: output not found (probably trimmed)
<... skip...>
2024-04-20 00:41:26,050 INFO  f.a.e.db.DbEventHandler n:... c:... - paying mining fee=0 sat for txid=... desc=commit-tx
2024-04-20 00:41:26,052 WARN  f.a.e.c.fsm.Channel n:... c:... - unhandled event CommitSig(...,...,List(...),TlvStream(Set(),Set())) in state CLOSING
2024-04-20 00:41:26,209 INFO  f.a.eclair.Diagnostics n:... c:... - IN msg=Error(804a26355581d14ef98c07aef8f3c9d4420e65b2a0b508e3d0ecd4dbf508cdb1,ByteVector(12 bytes, 0x72656d6f7465206572726f72),TlvStream(Set(),Set()))
2024-04-20 00:41:26,209 INFO  f.a.e.i.Peer n:... c:... - IN msg=Error(804a26355581d14ef98c07aef8f3c9d4420e65b2a0b508e3d0ecd4dbf508cdb1,ByteVector(12 bytes, 0x72656d6f7465206572726f72),TlvStream(Set(),Set()))
2024-04-20 00:41:26,209 ERROR f.a.e.c.fsm.Channel n:... c:... - peer sent error: ascii='remote error' bin=72656d6f7465206572726f72

The difference is only 3.1~ times, and my config is set to:

eclair.feerate-tolerance {
      ratio-low = 0.5 // will allow remote fee rates as low as half our local feerate when not using anchor outputs
      ratio-high = 20.0 // will allow remote fee rates as high as 20 times our local feerate when not using anchor outputs
    }

I did not expect for this to happen, given the settings and even defaults.

The channel was force-closed by my node.

No idea, it is the first time I see this type of closure with such a small ratio.

Eclair 0.10.0

It is running within: adoptopenjdk/openjdk11:x86_64-ubuntu-jre-11.0.22_7

fishcakeday commented 6 months ago

Ok, I think I see it now, it is the 0.5 ratio, not the other one. Please feel free to close if I misinterpreted the config.

fishcakeday commented 4 months ago

Had one more channel FC because of this and I have a fairly large tolerances configured, but they are not respected.

eclair.feerate-tolerance {
      ratio-low = 0.05 
      ratio-high = 20.0
    }

While the reson in the logs is stated as: remote feeratePerKw=37500 sat/kw, local feerate PerKw=2500 sat/kw, ratio=15.0

I do not know what else am I missing or if there is a bug. I am not even sure how this “protection” protects when it only serves in randomly closing channels when the mempool is turbulent like now.