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

trampoline: use exponential search for fees, capped by configurable budget #9041

Merged
merged 4 commits into from
May 9, 2024

Conversation

SomberNight
Copy link
Member

See individual commit messages.

closes #9033

Values for exponential search are based on available fee budget:
we try with budget/64, budget/32, ..., budget/1  (spread uniformly among the selected Trampoline Forwarders).
Hence, if we make the fee budget configurable, that will usefully affect the trampoline fees as well.

related spesmilo#9033
@SomberNight SomberNight added this to the 4.5.5 milestone May 6, 2024
@SomberNight SomberNight force-pushed the 202405_tramp1 branch 2 times, most recently from f6ddc44 to bc4e6fc Compare May 6, 2024 22:35
Comment on lines +158 to +161
MAX_LEVEL = 6
if trampoline_fee_level > MAX_LEVEL:
raise NoPathFound()
budget_to_use = budget.fee_msat // (2 ** (MAX_LEVEL - trampoline_fee_level))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this logic means that the lowest total fee we will try is the user configured max divided by 32. E.g. by default the max is 1% of payment amount, i.e. fee=1/3200*payment_amount.

If the user configures a higher max budget, that raises the corresponding the lowest possible fee we will try.

- make PaymentFeeBudget proportional fee and flat cutoff fee configurable
  - closes spesmilo#7622
- increase flat cutoff fee default to 10 sat
  - closes spesmilo#7669
- rm RouteEdge.is_sane_to_use() (per edge limit) and just rely on budgets (per route limit)
Expose as a slider; perhaps it is less footgunny this way?
@ecdsa ecdsa merged commit dfa2477 into spesmilo:master May 9, 2024
15 checks passed
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.

Acinq trampoline fees have been raised recently
2 participants