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
@@ -23,6 +23,33 @@ See https://github.com/lightning/bolts/pull/1044 for more details.
23
23
Support is disabled by default as the spec is not yet final.
24
24
It can be enabled by setting `eclair.features.option_attributable_failure = optional` at the risk of being incompatible with the final spec.
25
25
26
+
### Local reputation and HTLC endorsement
27
+
28
+
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.
29
+
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.
30
+
The reputation is per incoming node and endorsement level.
31
+
The confidence that the HTLC will be fulfilled is transmitted to the next node using the endorsement TLV of the `update_add_htlc` message.
32
+
Note that HTLCs that are considered dangerous are still relayed: this is the first phase of a network-wide experimentation aimed at collecting data.
33
+
34
+
To configure, edit `eclair.conf`:
35
+
36
+
```eclair.conf
37
+
// We assign reputations to our peers to prioritize payments during congestion.
38
+
// The reputation is computed as fees paid divided by what should have been paid if all payments were successful.
39
+
eclair.relay.peer-reputation {
40
+
// Set this parameter to false to disable the reputation algorithm and simply relay the incoming endorsement
41
+
// value, as described by https://github.com/lightning/blips/blob/master/blip-0004.md,
42
+
enabled = true
43
+
// Reputation decays with the following half life to emphasize recent behavior.
44
+
half-life = 7 days
45
+
// Payments that stay pending for longer than this get penalized
46
+
max-relay-duration = 12 seconds
47
+
// Pending payments are counted as failed, and because they could potentially stay pending for a very long time,
48
+
// the following multiplier is applied.
49
+
pending-multiplier = 1000 // A pending payment counts as a thousand failed ones.
50
+
}
51
+
```
52
+
26
53
### API changes
27
54
28
55
-`listoffers` now returns more details about each offer.
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
@@ -130,6 +130,8 @@ case class ExpiryTooBig (override val channelId: Byte
130
130
caseclassHtlcValueTooSmall (overridevalchannelId:ByteVector32, minimum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"htlc value too small: minimum=$minimum actual=$actual")
131
131
caseclassHtlcValueTooHighInFlight (overridevalchannelId:ByteVector32, maximum: MilliSatoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"in-flight htlcs hold too much value: maximum=$maximum actual=$actual")
132
132
caseclassTooManyAcceptedHtlcs (overridevalchannelId:ByteVector32, maximum: Long) extendsChannelException(channelId, s"too many accepted htlcs: maximum=$maximum")
133
+
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")
134
136
caseclassRemoteDustHtlcExposureTooHigh (overridevalchannelId:ByteVector32, maximum: Satoshi, actual: MilliSatoshi) extendsChannelException(channelId, s"dust htlcs hold too much value: maximum=$maximum actual=$actual")
@@ -849,7 +862,7 @@ case class Commitments(params: ChannelParams,
849
862
* @paramcmd add HTLC command
850
863
* @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