Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endorse htlc and local reputation #2716

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Endorse htlc and local reputation #2716

wants to merge 8 commits into from

Conversation

thomash-acinq
Copy link
Member

@thomash-acinq thomash-acinq commented Jul 21, 2023

We do not yet drop HTLCs, the purpose is to collect data first.

We add

  1. An endorsement bit to UpdateAddHtlc. This follows draft: HTLC Endorsement to Mitigate Channel Jamming lightning/bolts#1071.
  2. A local reputation system: For each pair (origin node, endorsement value), we compute its reputation as total fees that were paid divided by total fees that would have been paid if all HTLCs had fulfilled. When considering an HTLC to relay, we only forward it if the reputation of its source is higher than the occupancy of the outgoing channel.
  3. A limit on the number of small HTLCs per channel. We allow just very small HTLCs per channel so that it's not possible to block large HTLCs using only small HTLCs (similar to Add a channel congestion control mechanism #2330 but continuous).

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2023

Codecov Report

Merging #2716 (deab085) into master (12adf87) will increase coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master    #2716      +/-   ##
==========================================
+ Coverage   85.82%   85.86%   +0.04%     
==========================================
  Files         216      218       +2     
  Lines       18126    18209      +83     
  Branches      771      749      -22     
==========================================
+ Hits        15556    15636      +80     
- Misses       2570     2573       +3     
Files Coverage Δ
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 93.47% <100.00%> (+0.08%) ⬆️
...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala 75.29% <100.00%> (+0.14%) ⬆️
...in/scala/fr/acinq/eclair/channel/ChannelData.scala 100.00% <ø> (ø)
...in/scala/fr/acinq/eclair/channel/Commitments.scala 96.93% <100.00%> (+0.11%) ⬆️
...ain/scala/fr/acinq/eclair/channel/Monitoring.scala 96.15% <100.00%> (+0.23%) ⬆️
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 85.80% <100.00%> (+0.15%) ⬆️
...ain/scala/fr/acinq/eclair/payment/Monitoring.scala 98.30% <100.00%> (+0.09%) ⬆️
.../scala/fr/acinq/eclair/payment/PaymentPacket.scala 90.82% <100.00%> (ø)
...a/fr/acinq/eclair/payment/relay/ChannelRelay.scala 96.03% <100.00%> (+0.16%) ⬆️
...fr/acinq/eclair/payment/relay/ChannelRelayer.scala 100.00% <100.00%> (ø)
... and 9 more

... and 3 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants