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

Add new config setting max_balance_dust_htlc_msat #1009

Merged

Commits on Aug 5, 2021

  1. Add additional TLV serialization type of (default_value, N)

    This allows TLV serialization macros to read non-Option-wrapped
    types but allow them to be missing, filling them in with the
    provided default value as needed.
    TheBlueMatt authored and Antoine Riard committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    01bdc15 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Add new config setting max_balance_dust_htlc_msat

    Trimmed-to-dust HTLCs are at risk of being burnt as miner fees
    at anytime during their lifetime due to the broadcast of either
    holder commitment transaction or counterparty's one.
    
    To hedge against this risk, we introduce a new config setting
    `max_balance_dust_htlc_msat`, with the initial value of
    5_000_000 msat.
    ariard committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    53b6823 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29e755b View commit details
    Browse the repository at this point in the history
  3. Enforce max_balance_dust_htlc_msat at HTLC reception/forward

    At `update_add_htlc()`/`send_htlc()`, we verify that the inbound/
    outbound dust or the sum of both, on either sides of the link isn't
    above new config setting `max_balance_dust_htlc_msat`.
    
    A dust HTLC is hence defined as a trimmed-to-dust one, i.e including
    the fee cost to publish its claiming transaction.
    ariard committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    1cf2b53 View commit details
    Browse the repository at this point in the history
  4. Add test_max_balance_dust_htlc

    ariard committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    730f6f3 View commit details
    Browse the repository at this point in the history