Add unannounced_channel_max_inbound_htlc_value_in_flight_percentage#4529
Conversation
|
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
|
No issues found. All three items from the previous review have been addressed:
I verified all test changes use the correct field ( |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4529 +/- ##
==========================================
- Coverage 87.10% 87.10% -0.01%
==========================================
Files 163 163
Lines 108740 108856 +116
Branches 108740 108856 +116
==========================================
+ Hits 94723 94817 +94
- Misses 11531 11550 +19
- Partials 2486 2489 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
887ca41 to
3644da0
Compare
lightning/src/util/config.rs
Outdated
| /// See [`ChannelHandshakeConfig::our_to_self_delay`] and [`ChannelConfig::cltv_expiry_delta`] | ||
| /// for more information. | ||
| /// | ||
| /// Default value: `25` |
There was a problem hiding this comment.
Let's definitely default to 100.
lightning/src/util/config.rs
Outdated
| our_htlc_minimum_msat: Readable::read(reader)?, | ||
| max_inbound_htlc_value_in_flight_percent_of_channel: Readable::read(reader)?, | ||
| announced_channel_max_inbound_htlc_value_in_flight_percentage: Readable::read(reader)?, | ||
| unannounced_channel_max_inbound_htlc_value_in_flight_percentage: Readable::read( |
There was a problem hiding this comment.
nit; i dont think its worth reading a separate value here, just copy the one from the announced field so we don't end up invalidating existing fuzz corpuses.
|
@benthecarman @tnull a heads up we are revisiting some defaults here |
|
Feel free to squash. |
benthecarman
left a comment
There was a problem hiding this comment.
concept ack for sure!
| // Set the percentage to the default value at the time this test was written | ||
| config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage = | ||
| 10; | ||
| let configs = [ |
There was a problem hiding this comment.
nit: I think you can do let configs: [Option<Config>; 9] = std::array::from_fn(|_| Some(config.clone())); to clean this up
a0e4183 to
e12945f
Compare
|
Squashed with |
Users can now configure two different max percentages for the channel value that can be allocated to inbound HTLCs, one for announced channels, and another for unannounced channels. We also bump the default maximums to 25% for announced channels, and 100% for unannounced channels, to bring them closer to what people would expect.
e12945f to
2867d5c
Compare
Uh oh!
There was an error while loading. Please reload this page.