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
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,33 @@ Existing `static_remote_key` channels will continue to work. You can override th
33
33
34
34
Eclair will not allow remote peers to open new obsolete channels that do not support `option_static_remotekey`.
35
35
36
+
### Local reputation and HTLC endorsement
37
+
38
+
To protect against jamming attacks, eclair gives a reputation to its neighbors and uses it to decide if a HTLC should be relayed given how congested the outgoing channel is.
39
+
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.
40
+
The reputation is per incoming node and endorsement level.
41
+
The confidence that the HTLC will be fulfilled is transmitted to the next node using the endorsement TLV of the `update_add_htlc` message.
42
+
Note that HTLCs that are considered dangerous are still relayed: this is the first phase of a network-wide experimentation aimed at collecting data.
43
+
44
+
To configure, edit `eclair.conf`:
45
+
46
+
```eclair.conf
47
+
// We assign reputations to our peers to prioritize payments during congestion.
48
+
// The reputation is computed as fees paid divided by what should have been paid if all payments were successful.
49
+
eclair.relay.peer-reputation {
50
+
// Set this parameter to false to disable the reputation algorithm and simply relay the incoming endorsement
51
+
// value, as described by https://github.com/lightning/blips/blob/master/blip-0004.md,
52
+
enabled = true
53
+
// Reputation decays with the following half life to emphasize recent behavior.
54
+
half-life = 7 days
55
+
// Payments that stay pending for longer than this get penalized
56
+
max-relay-duration = 12 seconds
57
+
// Pending payments are counted as failed, and because they could potentially stay pending for a very long time,
58
+
// the following multiplier is applied.
59
+
pending-multiplier = 1000 // A pending payment counts as a thousand failed ones.
60
+
}
61
+
```
62
+
36
63
### API changes
37
64
38
65
-`channelstats` now takes optional parameters `--count` and `--skip` to control pagination. By default, it will return first 10 entries. (#2890)
Some(system.spawn(Behaviors.supervise(ReputationRecorder(nodeParams.relayParams.peerReputationConfig, Map.empty)).onFailure(typed.SupervisorStrategy.resume), name ="reputation-recorder"))
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
@@ -123,6 +123,8 @@ case class ExpiryTooBig (override val channelId: Byte
123
123
caseclassHtlcValueTooSmall (overridevalchannelId:ByteVector32, minimum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"htlc value too small: minimum=$minimum actual=$actual")
124
124
caseclassHtlcValueTooHighInFlight (overridevalchannelId:ByteVector32, maximum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"in-flight htlcs hold too much value: maximum=$maximum actual=$actual")
125
125
caseclassTooManyAcceptedHtlcs (overridevalchannelId:ByteVector32, maximum: Long) extendsChannelException(channelId, s"too many accepted htlcs: maximum=$maximum")
126
+
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")
127
129
caseclassRemoteDustHtlcExposureTooHigh (overridevalchannelId:ByteVector32, maximum: Satoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"dust htlcs hold too much value: maximum=$maximum actual=$actual")
@@ -835,7 +848,7 @@ case class Commitments(params: ChannelParams,
835
848
* @paramcmd add HTLC command
836
849
* @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