Skip to content

Set default ChannelHandshakeLimits::min_funding_satoshis to 1000 #3220

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

Merged

Conversation

dunxen
Copy link
Contributor

@dunxen dunxen commented Aug 2, 2024

The original default value of 0 was inconsistent with the minimum requirement of 1000 satoshis in ChannelHandshakeConfig::their_channel_reserve_proportional_millionths.

Fixes #2058.

@dunxen
Copy link
Contributor Author

dunxen commented Aug 2, 2024

Looking for some other inconsistencies at the moment.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.73%. Comparing base (1d9d911) to head (779b194).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3220      +/-   ##
==========================================
- Coverage   89.74%   89.73%   -0.01%     
==========================================
  Files         122      122              
  Lines      101912   101903       -9     
  Branches   101912   101903       -9     
==========================================
- Hits        91457    91439      -18     
- Misses       7765     7773       +8     
- Partials     2690     2691       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Generally looks good, but I wonder if we should set the lower bound dynamically rather than just aligning the default values?

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Generally looks good, but I wonder if we should set the lower bound dynamically rather than just aligning the default values?

Sadly "minimum channel value" is a really common thing to configure, so removing the option would probably leave the API lacking for our users :(

@dunxen dunxen force-pushed the 2024-08-config-param-consistency branch from b6340e9 to 94943e5 Compare August 8, 2024 11:48
@dunxen dunxen marked this pull request as ready for review August 8, 2024 11:48
tnull
tnull previously approved these changes Aug 8, 2024
TheBlueMatt
TheBlueMatt previously approved these changes Aug 8, 2024
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheBlueMatt
Copy link
Collaborator

Oops, broken link:

error: unresolved link to `ChannelHandShakeConfig::their_channel_reserve_proportional_millionths`
   --> lightning/src/util/config.rs:261:20
    |
261 |     /// (Minimum of [`ChannelHandShakeConfig::their_channel_reserve_proportional_millionths`])
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `ChannelHandShakeConfig` in scope
    |

The original default value of 0 was inconsistent with the minimum requirement
of 1000 satoshis in ChannelHandshakeConfig::their_channel_reserve_proportional_millionths.
@dunxen dunxen dismissed stale reviews from TheBlueMatt and tnull via 779b194 August 8, 2024 18:04
@dunxen dunxen force-pushed the 2024-08-config-param-consistency branch from 94943e5 to 779b194 Compare August 8, 2024 18:04
@dunxen
Copy link
Contributor Author

dunxen commented Aug 8, 2024

Oops, broken link:

Sorry! Fixed and checked locally (this time)

@TheBlueMatt TheBlueMatt merged commit 795887a into lightningdevkit:main Aug 8, 2024
18 of 21 checks passed
@dunxen dunxen deleted the 2024-08-config-param-consistency branch January 20, 2025 08:32
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.

Improve channel config parameter consistency
3 participants