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
Copy file name to clipboardExpand all lines: docs/release-notes/eclair-vnext.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,25 @@ Existing `static_remote_key` channels will continue to work. You can override th
24
24
25
25
Eclair will not allow remote peers to open new obsolete channels that do not support `option_static_remotekey`.
26
26
27
+
### Local reputation and HTLC endorsement
28
+
29
+
To protect against jamming attacks, eclair gives a reputation to its neighbors and uses to decide if a HTLC should be relayed given how congested is the outgoing channel.
30
+
The reputation is basically how much this node paid us in fees divided by how much they should have paid us for the liquidity and slots that they blocked.
31
+
The reputation is per incoming node and endorsement level.
32
+
The confidence that the HTLC will be fulfilled is transmitted to the next node using the endorsement TLV of the `update_add_htlc` message.
33
+
34
+
To configure, edit `eclair.conf`:
35
+
```eclair.conf
36
+
eclair.local-reputation {
37
+
# Reputation decays with the following half life to emphasize recent behavior.
38
+
half-life = 7 days
39
+
# HTLCs that stay pending for longer than this get penalized
40
+
good-htlc-duration = 12 seconds
41
+
# How much to penalize pending HLTCs. A pending HTLC is considered equivalent to this many fast-failing HTLCs.
Copy file name to clipboardExpand all lines: eclair-core/src/main/scala/fr/acinq/eclair/channel/ChannelExceptions.scala
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,8 @@ case class ExpiryTooBig (override val channelId: Byte
118
118
caseclassHtlcValueTooSmall (overridevalchannelId:ByteVector32, minimum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"htlc value too small: minimum=$minimum actual=$actual")
119
119
caseclassHtlcValueTooHighInFlight (overridevalchannelId:ByteVector32, maximum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"in-flight htlcs hold too much value: maximum=$maximum actual=$actual")
120
120
caseclassTooManyAcceptedHtlcs (overridevalchannelId:ByteVector32, maximum: Long) extendsChannelException(channelId, s"too many accepted htlcs: maximum=$maximum")
121
+
caseclassTooManySmallHtlcs (overridevalchannelId:ByteVector32, number: Long, below: MilliSatoshi) extendsChannelException(channelId, s"too many small htlcs: $number HTLCs below $below")
caseclassLocalDustHtlcExposureTooHigh (overridevalchannelId:ByteVector32, maximum: Satoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"dust htlcs hold too much value: maximum=$maximum actual=$actual")
122
124
caseclassRemoteDustHtlcExposureTooHigh (overridevalchannelId:ByteVector32, maximum: Satoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"dust htlcs hold too much value: maximum=$maximum actual=$actual")
returnLeft(TooManySmallHtlcs(params.channelId, number = i +1, below = amountMsat))
573
+
}
574
+
}
575
+
555
576
Right(())
556
577
}
557
578
@@ -835,7 +856,7 @@ case class Commitments(params: ChannelParams,
835
856
* @paramcmd add HTLC command
836
857
* @return either Left(failure, error message) where failure is a failure message (see BOLT #4 and the Failure Message class) or Right(new commitments, updateAddHtlc)
0 commit comments