Skip to content

Conversation

@thomash-acinq
Copy link
Member

@thomash-acinq thomash-acinq commented Jul 23, 2025

When computing reputation, instead of using a fixed multiplier for pending HTLCs, we now use the CLTV expiry of the HTLC (assuming a new block is mined every 10 minutes).
The reason for the fixed multiplier was that a HTLC with the maximum CLTV delta could stay pending for several orders of magnitude longer than a regular HTLC and would have an oversized impact on the reputation. We mitigate this by increasing the expected settlement time (from a few seconds to a few minutes), using more historical data (increasing the half-life), and counting on the fact that most HTLCs will have a CLTV expiry a lot lower than the maximum.

@thomash-acinq thomash-acinq force-pushed the reputation-cltv branch 3 times, most recently from 5b7bab0 to 8cec02b Compare July 29, 2025 09:49
@thomash-acinq thomash-acinq requested a review from t-bast July 29, 2025 10:00
@thomash-acinq thomash-acinq marked this pull request as ready for review July 29, 2025 10:00
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.06%. Comparing base (09fc936) to head (c29aa18).
⚠️ Report is 8 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3134      +/-   ##
==========================================
+ Coverage   86.04%   86.06%   +0.01%     
==========================================
  Files         239      239              
  Lines       21831    21866      +35     
  Branches      822      858      +36     
==========================================
+ Hits        18785    18819      +34     
- Misses       3046     3047       +1     
Files with missing lines Coverage Δ
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 92.26% <ø> (-0.02%) ⬇️
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 83.62% <100.00%> (+0.11%) ⬆️
...a/fr/acinq/eclair/payment/relay/ChannelRelay.scala 96.62% <100.00%> (ø)
...r/acinq/eclair/payment/send/PaymentLifecycle.scala 84.40% <100.00%> (+0.07%) ⬆️
.../scala/fr/acinq/eclair/reputation/Reputation.scala 98.27% <100.00%> (+0.54%) ⬆️
...r/acinq/eclair/reputation/ReputationRecorder.scala 93.33% <100.00%> (+0.83%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomash-acinq thomash-acinq merged commit 5703cd4 into master Aug 18, 2025
1 check passed
@thomash-acinq thomash-acinq deleted the reputation-cltv branch August 25, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants